-
Notifications
You must be signed in to change notification settings - Fork 43
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
Breaking: fix cat, again #515
Conversation
Hm, I think this solution is still problematic, because it is completely fine for a third-party function to From that perspective, falling back to the parent array type and raising a warning instead of an error is more useful. I wonder if this type-instability is really a major issue, since that fallback should create a typeunion of size 2, which is usually okay for performance. An alternative would be to take this approach |
Thanks, thats good feedback. I agree the warning and non-dimensional return value are probably the best outcome here. Part of my reason to try for type stability was #500, but probably its fine compared to the cost of concatenation in most cases. And yes we should get a small union optimisation if its written properly. |
@sethaxen, another question I would like to bounce off you: If the dimension lookup values don't make sense - say they contain duplicate values or have the wrong order - should we try to keep the dimension wrappers and drop to I'm trying to "get this right" once and for all, but its proving to be hard to do. |
Codecov Report
@@ Coverage Diff @@
## main #515 +/- ##
==========================================
+ Coverage 89.38% 89.43% +0.04%
==========================================
Files 39 39
Lines 2874 3369 +495
==========================================
+ Hits 2569 3013 +444
- Misses 305 356 +51
... and 9 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Ok, properly this time.
Breaking change for a number of minor reasons.
Constructed dimensions passed to
dims
will now replace the current dimensiion. Symbols or types will try to use the existing dimension values, or error if they don't make sense.Passing constructed dimensions that are the wrong size will now break, where before it just used the existing dimensions. As with the last PR, buggy, incorrect lookups are no longer allowed, and will
errorresult in a warning andcat
on theparent
array being returned.