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

ENH: Use int shape #2995

Merged
merged 2 commits into from
Oct 19, 2013
Merged

ENH: Use int shape #2995

merged 2 commits into from
Oct 19, 2013

Conversation

larsoner
Copy link
Member

This suppresses numpy warnings.

@pv
Copy link
Member

pv commented Oct 15, 2013

Maybe better use newshape = [1]*x.ndim

In [2]: %timeit np.ones(5, dtype=int)
1000000 loops, best of 3: 1.75 us per loop
In [3]: %timeit [1]*5
10000000 loops, best of 3: 152 ns per loop

Not that it matters a lot, but it's weird to use an array for the shape tuple.

@larsoner
Copy link
Member Author

Fine by me @pv... might as well speed up while fixing a minor bug. Latest commit adds this.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 1f449dd on Eric89GXL:signaltools-int-fix into 7479249 on scipy:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 1f449dd on Eric89GXL:signaltools-int-fix into 7479249 on scipy:master.

rgommers added a commit that referenced this pull request Oct 19, 2013
@rgommers rgommers merged commit 7dd9e12 into scipy:master Oct 19, 2013
@rgommers
Copy link
Member

Thanks @Eric89GXL, merged.

@larsoner larsoner deleted the signaltools-int-fix branch March 11, 2014 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants