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

No test for 'fromregex' in r4960 (Trac #719) #1317

Closed
numpy-gitbot opened this issue Oct 19, 2012 · 7 comments
Closed

No test for 'fromregex' in r4960 (Trac #719) #1317

numpy-gitbot opened this issue Oct 19, 2012 · 7 comments

Comments

@numpy-gitbot
Copy link

Original ticket http://projects.scipy.org/numpy/ticket/719 on 2008-04-05 by @stefanv, assigned to @teoliphant.

No test for 'fromregex' in r4960. Blocks release of 1.0.5.

@numpy-gitbot
Copy link
Author

Title changed from No test for 'fromregex' in r1960 to No test for 'fromregex' in r4960 by @stefanv on 2008-04-05

@numpy-gitbot
Copy link
Author

@jarrodmillman wrote on 2008-04-09

See r4990, r4986, r4961.

@numpy-gitbot
Copy link
Author

@pv wrote on 2008-04-12

fromregex apparently doesn't work: it tries to reference array instead of np.array, and the use of kwds.values() instead of kwds.items() is also suspect. Patch with tests is attached.

One of the tests fails right now (test_record_2), because there is a problem with np.array and int32:

>>> import numpy as np
>>> np.array([('123',), ('456',)], dtype=[('num', np.int64)])
array([(123L,), (456L,)], 
      dtype=[('num', '<i8')])
>>> np.array([('123',), ('456',)], dtype=[('num', np.int32)])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: expected a readable buffer object

@numpy-gitbot
Copy link
Author

Attachment added by @pv on 2008-04-12: fix-fromregex.patch

@numpy-gitbot
Copy link
Author

@pv wrote on 2008-04-12

The patch also changes semantics of fromregex. We can't rely on items in **kwd being in any specific order, so it's safer to accept a dtype instead of a bunch of keywords.

@numpy-gitbot
Copy link
Author

@stefanv wrote on 2008-04-12

Great detective work, Pauli. I've created #1334 to address the record array problem.

@numpy-gitbot
Copy link
Author

@stefanv wrote on 2008-04-12

Patch applied in r5026 (broken test disabled until #1334 is fixed). Thanks, Pauli!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant