-
Notifications
You must be signed in to change notification settings - Fork 204
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
data types in csr matrix #493
Comments
I wouldn't worry about the dtypes for this assignment.
-Aron
…On Wed, Oct 9, 2019 at 4:44 PM annonch ***@***.***> wrote:
Curiously using example code from the link in A2
The expected behavior differs from observed. Using int64 does not print
the dtype information however int8 does.
Am I missing something?
>>> from scipy.sparse import *
>>> from scipy import *
>>> csr_matrix((3,4),dtype='int64').toarray()
array([[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]]) # Error
>>> csr_matrix((3,4),dtype='int8').toarray()
array([[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]], dtype=int8) # no error
>>> import numpy as np
>>> csr_matrix((3,4),dtype=np.int64).toarray()
array([[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]])
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#493?email_source=notifications&email_token=AA575BPQS6K2QVHW7AOBS53QNZGCTA5CNFSM4I7FFJR2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HQYLEJQ>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA575BNTS3WSXXMWYHO7RKDQNZGCTANCNFSM4I7FFJRQ>
.
|
Okay, just that my test for 'vectorize' will fail... My guess is platform dependency or version number.. Anyone else see this for osx? I use ports to install everything and pip for python packages. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Curiously using example code from the link in A2
The expected behavior differs from observed. Using int64 does not print the dtype information however int8 does.
Am I missing something?
The text was updated successfully, but these errors were encountered: