-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
ValueError in np.repeat(Array) with repeats=0 #6076
Copy link
Copy link
Closed
Labels
Description
>>> import numpy as np
>>> import pandas as pd
>>> np.repeat(da.ones((4, 4)), 0, 0)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-32-e7268ecdaf98> in <module>
----> 1 np.repeat(da.ones((4, 4)), 0, 0)
<__array_function__ internals> in repeat(*args, **kwargs)
~/sandbox/dask/dask/array/core.py in __array_function__(self, func, types, args, kwargs)
1380 if da_func is func:
1381 return handle_nonmatching_names(func, args, kwargs)
-> 1382 return da_func(*args, **kwargs)
1383
1384 @property
~/sandbox/dask/dask/array/creation.py in repeat(a, repeats, axis)
793 out.append(result)
794
--> 795 return concatenate(out, axis=axis)
796
797
~/sandbox/dask/dask/array/core.py in concatenate(seq, axis, allow_unknown_chunksizes)
3457
3458 if not seq:
-> 3459 raise ValueError("Need array(s) to concatenate")
3460
3461 meta = np.concatenate([meta_from_array(s) for s in seq], axis=axis)
ValueError: Need array(s) to concatenateCompared with NumPy
In [33]: np.repeat(np.ones((4, 4)), 0, 0)
Out[33]: array([], shape=(0, 4), dtype=float64)Reactions are currently unavailable