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

Fix usage of astype for NumPy 1.6 #627

Merged
merged 1 commit into from
Jan 20, 2015
Merged

Fix usage of astype for NumPy 1.6 #627

merged 1 commit into from
Jan 20, 2015

Conversation

tbekolay
Copy link
Member

The copy kwarg was added to NumPy in 1.7. Since we depend on numpy>=1.6, we shouldn't use it. This uses asarray instead.

The `copy` kwarg was added to NumPy in 1.7. Since we depend on
`numpy>=1.6`, we shouldn't use it. This uses `asarray` instead.
@tbekolay tbekolay added the bug label Jan 20, 2015
@tbekolay tbekolay added this to the 2.0.1 release milestone Jan 20, 2015
@tbekolay
Copy link
Member Author

Confirmed that this allows Nengo to work on @cchan987's machine, which uses NumPy 1.6.1 👍

@jgosmann
Copy link
Collaborator

LGTM, but we should fix it probably in two other places too: here and here

@hunse
Copy link
Collaborator

hunse commented Jan 20, 2015

@jgosmann: I'm not too worried about those two places, because they don't use copy=False so they won't break on Numpy < 1.7, and they're in tests where I'm not worried about the extra copy of a small array.

@tbekolay
Copy link
Member Author

These don't use the copy kwarg; the function existed in 1.6, it just didn't have a copy kwarg until in 1.7.

@jgosmann
Copy link
Collaborator

Oh, right. I somewhat missed the part that it is only the copy arg. 👓

@hunse hunse merged commit fa31a19 into master Jan 20, 2015
@hunse hunse deleted the fix-astype branch January 20, 2015 22:26
tbekolay added a commit that referenced this pull request Jan 22, 2015
For this PR and #627, which didn't have a changelog etry added.
tbekolay added a commit that referenced this pull request Jan 22, 2015
For this PR and #627, which didn't have a changelog entry added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants