-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: Accept bigints in matrix indices and ranges, demoting to number #3361
Conversation
Thanks Glen, looks good 👍. I see a couple of occurrences in the comments of |
Oops, that comment has very much uncovered a bug. Clearly |
OK, all should be well now. Note In fact, from this point of view, |
(In fact, there is decent argument that a range of two complex numbers should return a 2-dim Matrix of the rectangle with those complex numbers as opposite corners and steps as given in the real and imaginary dimensions, but then there are questions as to whether you should be able to separately supply real and imaginary steps, and if you supply a single complex step should you go back to just getting a vector of values, but then what's the stopping condition, so leaving that be for now. Not going to try to support Complex.) |
OK, now |
Wow that involved more work than I had expected 😅 , thanks! Ideally, I think whe should not have the same logic in both |
Published now in |
Ι do not think Range is redundant, as it is lazy whereas range is eager. For long ranges, that can be important. If Range were ever made more prominent in the interface (as opposed to mostly hidden in the semantics for RangeNode) then I agree it should be enhanced to support other types. But right now it's only used for indexing arrays, I think, where only numbers make sense. |
Resolves #3360.
(Since it turns out to be such a small change, I just went ahead and implemented it. If in review there is any concern about the recommended change, to simply accept bigint indices and treat them as the corresponding numbers, it will be easy to modify or retract this.)