Hi,
I was curious why there was a difference in number of known failures
between Python2.6 and Python3.1 which is associated a test due to ticket 99:
http://projects.scipy.org/numpy/ticket/99
While this ticket was closed, it fails with Python 3.1 as indicated by
the message of the test output is:
'Ticket #99 ... KNOWNFAIL: numpy.intp('0xff', 16) not supported on Py3,
as it does not inherit from Python int'
I do understand that np.intp is integer size of a pointer. But it
appears to be mainly used for access to C programs. The only Python
numpy usage I saw was with the delete and insert function in
'numpy/lib/function_base.py'.
Does this really need to be exposed in Python?
If it does not, then could be removed for Numpy 2?
Otherwise, at the very least np.intp must have the same behavior across
Python versions. As per the ticket, since it is an integer type, should
it have the same properties as a regular integer?
Bruce
$ python3.1
Python 3.1.2 (r312:79147, Mar 24 2010, 10:44:23)
[GCC 4.4.3 20100127 (Red Hat 4.4.3-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.__version__
'1.5.0'
>>> numpy.intp('0xff', 16)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: function takes at most 1 argument (2 given)
>>> numpy.intp('0xff')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: setting an array element with a sequence.
>>>
Yet there is no problem with Python 2.6:
$ python
Python 2.6.4 (r264:75706, Jun 4 2010, 18:20:31)
[GCC 4.4.4 20100503 (Red Hat 4.4.4-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.__version__
'1.5.0'
>>> numpy.intp('0xff', 16)
255
>>>
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion