-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: fix 1xN mask on 1xN frame #4073
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -575,9 +575,10 @@ def func(c,v,o): | |
return make_block(result, self.items, self.ref_items) | ||
|
||
# might need to separate out blocks | ||
axis = cond.ndim-1 | ||
cond = cond.swapaxes(axis,0) | ||
mask = np.array([ cond[i].all() for i in enumerate(range(cond.shape[0]))],dtype=bool) | ||
axis = cond.ndim - 1 | ||
cond = cond.swapaxes(axis, 0) | ||
mask = np.array([cond[i].all() for i in xrange(cond.shape[0])], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. boy - guess was not thinking when I originally wrote that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. still worked tho...strange since enumerate composed with range should yield a tuple thus accessing the diagonal of the mask (in this case)...seems like that would have broken things (in a more general way) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok if your fix worked grrat |
||
dtype=bool) | ||
|
||
result_blocks = [] | ||
for m in [mask, ~mask]: | ||
|
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.
@jreback any reason for using
enumerate
here?