[go: nahoru, domu]

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

StructDict.__getitem__ broken #14

Closed
flying-sheep opened this issue Apr 29, 2017 · 2 comments
Closed

StructDict.__getitem__ broken #14

flying-sheep opened this issue Apr 29, 2017 · 2 comments

Comments

@flying-sheep
Copy link
Member
flying-sheep commented Apr 29, 2017
  • struct_dict['k'] should return a simple 1D ndarray, not a StructDict
  • struct_dict[['a', 'b']] should return a proper StructDict including all additional fields like _keys

both problems are visible in this test: https://travis-ci.org/theislab/scanpy/jobs/227216146#L224

but a test should be added for the second point once the first point is fixed


i would have fixed it, but i don’t have the slightest idea what all the “multicolumn” fields are for. also i don’t believe in too many caches and private fields, they get out of sync too easily. recomputing tiny things is fast, e.g. self._keys could simply be replaced with self.dtype.names

@falexwolf
Copy link
Member

fixed in 50b739c

@flying-sheep
Copy link
Member Author

great, thank you!

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

2 participants