Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Python 3 source compatibility #184

Merged
merged 14 commits into from
Aug 8, 2016
Merged

Python 3 source compatibility #184

merged 14 commits into from
Aug 8, 2016

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Jul 24, 2016

2to3 is the old method, and somewhat annoying. You need to run an extra translation step, which is (albeit minimally) slower, and you can't do an editable install because the source is not really Python 3 compatible.

This does add a dependency on six, but I think it's ubiquitous enough now to not be a problem.

@@ -177,7 +180,7 @@ def zeros_adapter(self, shape, dtype='f', keys=()):
return self.wrap(ndarray, keys)

def arange_adapter(self, shape, keys):
size = reduce(lambda x, y: x * y, shape)
size = np.product(shape)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@pelson pelson merged commit 6d2ca60 into SciTools:master Aug 8, 2016
@pelson
Copy link
Member

pelson commented Aug 8, 2016

Yet another awesome PR. Thanks @QuLogic!

@QuLogic QuLogic deleted the py3k branch October 22, 2016 00:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants