-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
getting a "truth value of an array" error when supplying my own concat_dim
.
#2647
Comments
To be more explicit, the issue is that |
Indeed, this is should definitely be I think this snuck through because NumPy will automatically cast size 1 arrays (of any shape) to booleans :(. We should probably adapt that test to include an explicit dimension of size greater than 1. |
ah! that's why it snuck through! I have been raking my brain on this for the past hour! shall I go ahead and make a PR? |
actually, we could simplify the conditional to be just |
I think |
scratch that... the test was an |
Closes pydata#2647 and re-affirms pydata#1988.
I just wanted to clarify that Also @WeatherGod I think this bug was introduced by me in #2553, but should be checked again once #2616 is finished, because the API will change. |
This bug was introduced sometime after v0.11.0 and has turned up in my test suite using v0.11.2. I'll pass a
DataArray()
as myconcat_dim
, and the failure will happen at line 609 in backends/api.py because of:if concat_dim is None or concat_dim == _CONCAT_DIM_DEFAULT:
I am not sure how this change got through. In #2048, I added a unit test that passes a DataArray as a concat_dim argument.
The text was updated successfully, but these errors were encountered: