Commit 71afa1c
committed
Table: Fix ensure_copy for sparse matrices
`ensure_copy` is checking whether an array is a view through the `.base` argument which doesn't exist on `scipy.sparse` matrices. Since `scipy.sparse` don't work with views (e.g. indexing returns a copy of the matrix) the check should only be performed for dense matrices.1 parent 4a484f6 commit 71afa1c
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
915 | | - | |
| 915 | + | |
| 916 | + | |
916 | 917 | | |
917 | | - | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
918 | 922 | | |
919 | | - | |
| 923 | + | |
920 | 924 | | |
921 | | - | |
| 925 | + | |
922 | 926 | | |
923 | | - | |
| 927 | + | |
924 | 928 | | |
925 | 929 | | |
926 | 930 | | |
| |||
0 commit comments