-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: fix test creating invalid CategoricalBlock #32519
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
TST: fix test creating invalid CategoricalBlock #32519
Conversation
@@ -1745,6 +1745,10 @@ def __init__(self, values, placement, ndim=None): | |||
values = self._maybe_coerce_values(values) | |||
super().__init__(values, placement, ndim) | |||
|
|||
if self.ndim == 2 and len(self.mgr_locs) != 1: |
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.
woa, why is this here? shouldn't this be in a higher level block construction?
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.
either goes here or in NonconsolidateableMixin (which should be merged into ExtensionBlock anyway)
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.
no this is not what i mean. how can we possibly get here when passing a Categorical? and if you can't except by directly constructing a manager, then this should be an assertion error.
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.
then this should be an assertion error.
sure, will update
k merge on green |
* TST: fix test creating invalid CategoricalBlock * ValueError->AssertionError
The incorrect tests here turned up when trying to replace Block.get_values calls with simpler alternatives.