-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Fix SolutionArray
extra slice
#1204
Conversation
35b7c31
to
3edbacd
Compare
@bryanwweber … this fix for the issue you reported is ready for review (and should be quick). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ischoegl, one case that I think needs to be investigated here.
As a total aside, outside the scope of this PR, but just to write it down somewhere, it'd be nice if SolutionArray
supported:
len()
.shape
- Accessing
extra
keys that can't be accessed by attributed because they have an invalid character (-
,
3edbacd
to
9c1651d
Compare
9c1651d
to
c7f0865
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Once the tests pass this is good for me
assert state.index == ix | ||
|
||
assert list(states[:2].index) == [0, 1] | ||
assert list(states[100:102].index) == [] # outside of range |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this should raise an IndexError
, but insofar as this maintains current behavior, it seems fine to me to keep it like this and defer adding the IndexError
.
If applicable, fill in the issue number this pull request is fixing
Closes #1203
If applicable, provide an example illustrating new features this pull request is introducing
Checklist
scons build
&scons test
) and unit tests address code coverage