Support for SparseArray #948
Li-Xiang-Ideal
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary of previous discussion in #946
Correct result of
Part
,Equal
,ArrayQ
, etc. onSparseArray
is expected.SparseArray[{{1, 2} -> 3}, {3, 3}][[1]] === SparseArray[{{2} -> 3}, {3}]
SparseArray[{{1, 2} -> 1, {2, 1} -> -1}] == {{0, 1}, {-1, 0}}
ArrayQ[SparseArray[{{1, 2} -> 1, {2, 1} -> -1}]] === True
ArrayQ[SparseArray[3, Pi]] === False
ArrayQ[SparseArray[{{1, 8} -> 3}, {3, 3}]] === False
To be continued...
Methods to implement
SparseArray
SparseArrayExpression
as special type ofExpression
(likeListExpression
)SymPy
orSciPy
Things to keep in mind
Current status
SciPy
is not particularly designed to work with symbolic expressionsSymPy
supportsSparseMatrix
only (notSparseArray
)To be continued...
Issues to be discussed
SparseArray
? Use as many existing packages as possible, or define our new type ofSparseArrayExpression
while leaving specific evaluations likeRowReduce
andSingularValueDecomposition
toSymPy
orSciPy
, or any other approaches?SymPy
,SciPy
, and?SparseArrayExpression
is needed, how to organize the code? Can we implement it inmathics.core
without being too entangled with the rest of the code (which means a new branch is preferred), or shall we use Pymathics module?To be continued...
Conclusions from new discussions
To be continued...
Beta Was this translation helpful? Give feedback.
All reactions