-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
defectA clear bug or issue that prevents SciPy from being installed or used as expectedA clear bug or issue that prevents SciPy from being installed or used as expectedscipy.sparse
Milestone
Description
Describe your issue.
The power of sparse array/matrix is expected to return one with the same dtype. However, in SciPy 1.8.0rc1, its 0th power always returns the identity of float64. I guess it was unintentionally missing in c3e4ec5.
Reproducing Code Example
>>> import numpy as np
>>> import scipy.sparse as sp
>>> a = sp.coo_array(np.ones((2, 2), dtype='D'))
>>> a.dtype
dtype('complex128')
>>> (a**0).dtype
dtype('float64')
Error message
N/A
SciPy/NumPy/Python version information
1.8.0rc1 1.22.0rc1 sys.version_info(major=3, minor=9, micro=7, releaselevel='final', serial=0)
Metadata
Metadata
Assignees
Labels
defectA clear bug or issue that prevents SciPy from being installed or used as expectedA clear bug or issue that prevents SciPy from being installed or used as expectedscipy.sparse