Skip to content

Commit

Permalink
BUG: sparse: get_index_dtype is called in some places with ndarray as…
Browse files Browse the repository at this point in the history
… first arg
  • Loading branch information
pv committed Feb 16, 2014
1 parent 2df405a commit 7cefb25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scipy/sparse/sputils.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ def get_index_dtype(arrays=(), maxval=None):
if maxval is not None:
if maxval > int32max:
dtype = np.int64

if isinstance(arrays, np.ndarray):
arrays = (arrays,)

for arr in arrays:
arr = np.asarray(arr)
if arr.dtype > np.int32:
Expand Down

0 comments on commit 7cefb25

Please sign in to comment.