Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX Work around weird numpy scalar behaviour (0-dimension arrays)
Seeing test-suite failures where a numpy scalar is getting into the handler and it's not being treated as a one-element array, but as a *0* element array, so everything goes to heck in a handbasket and dogs and cats are friends, mass hysteria, you know the drill This patch means that if you pass in a scalar we'll actually create a new 1-element numpy array and fill that array with the scalar rather than treating the scalar as a number-like thing that can pass through the rest of the machinery. I don't *see* how this changed in the numpy API, so I'm suspicious this is some weird behaviour that either never got noticed before or it was a side-effect of e.g. having two numpy libraries on a machine.
- Loading branch information