#8824: Make it so that numpy datatypes are integrated into the coercion model
------------------------+---------------------------------------------------
Reporter: jason | Owner: robertwb
Type: defect | Status: new
Priority: major | Milestone: sage-4.4.1
Component: coercion | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------+---------------------------------------------------
Comment(by dagss):
This might be a fitting place to record a wish: If Sage decides to do
something with NumPy arrays (not just scalars), I think the behaviour
should be something like:
{{{
sage: M = random_matrix(RDF, 4, 3)
sage: A = np.random.normal(size=(12, 10, 4)).astype(np.float32)
sage: type(A * M)
<type np.ndarray...>
sage: (A * M).shape
(12, 10, 3)
sage: (A * M).dtype
float64
}}}
I.e. let matrices be operators acting on data, operating along the vectors
along the rightmost dimension (matrix on right) or leftmost dimension
(matrix on left).
In particular, I think it would be very bad to coerce NumPy arrays to Sage
matrices!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8824#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.