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

Typestring "h2" works in 1.6, fails in master #294

Closed
njsmith opened this issue Jun 5, 2012 · 9 comments
Closed

Typestring "h2" works in 1.6, fails in master #294

njsmith opened this issue Jun 5, 2012 · 9 comments
Milestone

Comments

@njsmith
Copy link
Member

njsmith commented Jun 5, 2012

Problem (which breaks scipy):
http://mail.scipy.org/pipermail/numpy-discussion/2012-June/062605.html

Analysis:
http://mail.scipy.org/pipermail/numpy-discussion/2012-June/062606.html

Todo:

  • Re-enable parsing of type-strings like "h2" before the 1.7 release [DONE]
  • Give a deprecation warning for type-strings like "h100". Possibly also for type-strings like "h2" -- this isn't obvious. [DONE]
  • Disable at least "h100"- style type-strings for 1.9, or whenever we decide to finalize the deprecations that started in 1.7.
@certik
Copy link
Contributor

certik commented Dec 26, 2012

@njsmith, is this issue fixed now?

@njsmith
Copy link
Member Author

njsmith commented Dec 26, 2012

The 1.7 part of it is; I moved the milestone to 1.8.

@romanstingler
Copy link

blackout@debian:~$ python3
Python 3.2.3 (default, Feb 20 2013, 14:44:27)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import numpy as np
np.empty((1,), dtype='>h1000000')
array([-22330], dtype=int16)
np.version
'1.9.0.dev-48981a6'
np.empty((1,), dtype='h100')
array([-14680], dtype=int16)

gives me negative numbers

@charris
Copy link
Member

charris commented Feb 17, 2014

Working now. Types like h100 also pass as the number is simply ignored. It might be better at some point to raise an error for those.

@charris charris closed this as completed Feb 17, 2014
@seberg
Copy link
Member

seberg commented Feb 17, 2014

We do, there is a deprecation warning in place.

@charris
Copy link
Member

charris commented Feb 17, 2014

It isn't enabled, at least I don't see it.

@seberg
Copy link
Member

seberg commented Feb 17, 2014

Just added it to the 1.7 deprecation follow up ticket. It is there (and I think was new in 1.7):

In [1]: import warnings; warnings.filterwarnings('always')

In [2]: np.dtype('h100')
/usr/bin/ipython:1: DeprecationWarning: Specified size is invalid for this data type.
Size will be ignored in NumPy 1.7 but may throw an exception in future versions.
  #! /usr/bin/python
Out[2]: dtype('int16')

@seberg
Copy link
Member

seberg commented Feb 17, 2014

wow, there is an explicit 1.7 there sneeking in, not quite right of course... Maybe we can even turn it into an error in 1.9...

@charris
Copy link
Member

charris commented Feb 17, 2014

Ah, gotcha. Yes, making wrong sizes an error in 1.9 seems reasonable, should be mentioned in the release notes if we do.

luyahan pushed a commit to plctlab/numpy that referenced this issue Apr 25, 2024
feat: Add veor[q]_[s8|s16|s32|u8|u16|u32|s64|u64]
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

No branches or pull requests

5 participants