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
Inconsistency in complex(::Array) vs complex(::Array, ::Array) #31676
Comments
Removing the mixed-shape methods would be technically breaking but if no one is using this in PkgEval then we might be able to change this as a "minor change" in a minor release. |
Maybe I am missing something but what are "the mixed-shape methods"? AFAIU, the reason for having |
With a single array argument there is a standard algebraic meaning for "complexifying" a vector space — that is, Now that I think about it, in the same sense that you can write |
R^2 is the only real space bijective with C, so if we're keeping things rigorous, let's throw an error if someone passes |
@stillyslalom, that's not what |
I agree that the current behavior serves as an injection, but the function is |
My comment was made under the misapprehension that |
@stillyslalom, in Julia, we name functions (The bijection that you are referring to is spelled |
The two-array constructor method existed before being deprecated in the "More Dots" push, and the one-array method seems more semantically similar to that than to a |
Sure, we could deprecate that in 2.0. |
I don't think it matters whether callers of |
We should define (A minor advantage is also that I don’t have an objection to restoring the two argument “vectorized” form as well (for two arrays of the same shape only) since that has a sensible algebraic meaning, though I don’t think it’s as essential. |
There's some inconsistency in the
complex(...)
methods:You can always broadcast, of course:
complex.(rand(3), rand(3))
works fine. But it seems like it should either accept arrays for both arguments, or not at all.The text was updated successfully, but these errors were encountered: