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

Handle structure dtypes with titles #2021

Merged
merged 3 commits into from Aug 16, 2016
Merged

Handle structure dtypes with titles #2021

merged 3 commits into from Aug 16, 2016

Conversation

sklam
Copy link
Member

@sklam sklam commented Aug 8, 2016

Fix issue #2020

@@ -663,6 +663,37 @@ def test_record_two_arrays(self):
cfunc = self.get_cfunc(pyfunc, (nbrecord,))
self.assertEqual(cfunc(rec), pyfunc(rec))

def test_structure_dtype_with_titles(self):
# the following is the definition of int4 vector type from pyopencl
vecint4 = np.dtype([(('x', 's0'), '<i4'), (('y', 's1'), '<i4'),
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious: <i4 won't work a big-endian machine since we only support native-endian arrays, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

right, and I don't think we are checking the endian at all.

Copy link
Contributor

Choose a reason for hiding this comment

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

So the test could simply use 'i4' instead of '<i4'?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure

@pitrou pitrou merged commit 2d0e905 into numba:master Aug 16, 2016
@sklam sklam deleted the fix/iss2020 branch August 16, 2016 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants