Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tested by cwitty] add support for numpy arrays with integer entries #858

Closed
mwhansen opened this issue Oct 12, 2007 · 3 comments
Closed

Comments

@mwhansen
Copy link
Contributor

sage: import numpy
sage: a = numpy.array([[1,2],[3,4]],'int32')
sage: matrix(a)
---------------------------------------------------------------------------
<type 'exceptions.TypeError'>             Traceback (most recent call last)

/home/mhansen/sage/devel/sage-856/<ipython console> in <module>()

/home/mhansen/sage/local/lib/python2.5/site-packages/sage/matrix/constructor.py in matrix(arg0, arg1, arg2, arg3, sparse)
    399                     raise TypeError("cannot convert numpy matrix to SAGE matrix")
    400             else:
--> 401                 raise TypeError("cannot convert numpy matrix to SAGE matrix")
    402 
    403         else:

<type 'exceptions.TypeError'>: cannot convert numpy matrix to SAGE matrix

Component: numerical

Keywords: numpy

Issue created by migration from https://trac.sagemath.org/ticket/858

@mwhansen
Copy link
Contributor Author

Attachment: 858.patch.gz

patch #1

@mwhansen
Copy link
Contributor Author

Attachment: 858.2.patch.gz

added doctest

@mwhansen
Copy link
Contributor Author

comment:1

#859 should be applied before these two patches

@mwhansen mwhansen assigned mwhansen and unassigned williamstein Oct 12, 2007
@sagetrac-cwitty sagetrac-cwitty mannequin changed the title add support for numpy arrays with integer entries [tested by cwitty] add support for numpy arrays with integer entries Oct 13, 2007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants