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

eliminating special casing in __getitem__ #6

Closed
jsalvatier opened this issue Feb 18, 2011 · 3 comments
Closed

eliminating special casing in __getitem__ #6

jsalvatier opened this issue Feb 18, 2011 · 3 comments

Comments

@jsalvatier
Copy link
Member

Currently when getitem gets a scalar value, it returns an Index deterministic, otherwise it returns a regular deterministic that indexes into the array. My understanding is that Index exists so that linear models can be special cased. I would like to find a way to eliminate the special casing since it's a bit inelegant. Could Index be made to handle non-scalars?

@apatil
Copy link
Contributor

apatil commented Feb 18, 2011

If you can think of any other way for a step method, say, to look at a model and figure out when a deterministic's value is an element of another variable, that would be fine too.

@jsalvatier
Copy link
Member Author

Specifically a single element?

@apatil
Copy link
Contributor

apatil commented Feb 18, 2011

I guess it doesn't matter, as long as it's possible to figure out what slice is being taken.

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

3 participants