#17423: numpy -> vector ignores ring
----------------------------------+------------------------
Reporter: f.poloni | Owner:
Type: defect | Status: new
Priority: minor | Milestone: sage-6.5
Component: linear algebra | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
----------------------------------+------------------------
Description changed by jdemeyer:
Old description:
> It seems like the ring attribute of vector() is ignored in some cases.
>
> The following test should pass, if I understand correctly the use of the
> vector constructor:
>
> {{{#!python
> import numpy as np
> v = np.asarray([0.5,1])
> vv = vector(RealField(rnd='RNDU'),v)
> assert vv.parent().rounding_mode() == 'RNDU'
> }}}
>
> Instead, vv is created with ring RDF rather than the correct one, so the
> assertion fails because it cannot access rounding_mode().
New description:
{{{#!python
sage: import numpy as np
sage: v = np.asarray([0.5,1])
sage: vector(RR,v).parent()
Vector space of dimension 2 over Real Double Field
}}}
`vv` is created with ring RDF rather than the correct one.
--
--
Ticket URL: <http://trac.sagemath.org/ticket/17423#comment:4>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.