SciTools / biggus

:no_entry: [DEPRECATED] Virtual large arrays and lazy evaluation.
http://biggus.readthedocs.io/
GNU Lesser General Public License v3.0
54 stars 27 forks source link

biggus.Array.ndarray(...) and masked_array(...) don't always return arrays #175

Closed djkirkham closed 7 years ago

djkirkham commented 8 years ago

In certain degenerate cases, the result of calling ndarray(...) or masked_array(...) will be a NumPy numeric type, not an array. For example:

import biggus
import numpy as np

a = np.array(3)
b = biggus.NumpyArrayAdapter(a)
c = b * 4
d = c.ndarray()

print type(d)

The result is a NumPy integer type. This is consistent with the behaviour of NumPy arrays, but is confusing, especially since the docstrings for these functions explicitly state that they return a NumPy ndarray/MaskedArray instance.

pelson commented 7 years ago

Seems unlikely that we are going to change this behaviour in biggus, at this point (due to our general preference for dask.array). I'm going to close this issue out.

Thanks