-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
transposition operator for string arrays #6395
Comments
Actually,
|
Ah right, thanks. Note to self: RTFM: http://docs.julialang.org/en/latest/manual/functions/?highlight=transpose#operators-with-special-names |
The conjugate of a non-numeric value should fall back on the identity. In transit or I would do it. |
I'm not sure if this should be part of the behavior of |
See also #5449. |
Yeah, probably the ctranspose come to think of it. |
The only thing I can think of doing is defining
and using this instead of |
I think |
This is annoying every time I trip over it. I really don't see the problem with making conj the identity on non-numbers. |
I think what's going on here is that people don't want to type the extra
|
I'm with Stefan on this one, but if Jeff prevails, it would be nice to add |
Could you explain your reasoning? Do you think |
Can we define
|
My reasoning is that conj is the identity on anything that doesn't have an imaginary part – and strings clearly don't have an imaginary part. Obviously it's silly to take the conjugate of a string, but it seems pedantic to force using |
Well, a string can't be negative either, so maybe |
Touché. I'd be fine with making this part of the behavior of |
It's a matter of practicality and user friendliness. There's no syntactic construct that involves Julia is not about correctness and consistency above everything else, and, in this case, I think it's worth it to define |
I'm actually convinced now that this should be a behavior of |
Indeed. To be honest I hadn't checked the nitty gritty of the transposition implementation, as long as How would you handle maybeconj(x) = x
maybeconj(z::Complex) = conj(z) |
No; all methods of |
What worries me here is we're introducing a name for the concept "what you do to an element during generic transposition". In math, as far as I know, that's |
Well, this is what led me to the notion that |
It's still possible I could be convinced that that is the correct generic meaning of |
Isn't the |
That's the general trend, but happens not to be what this operator means. This is a traditional meaning inherited from Matlab. |
It is not that big a deal to explicitly call the transpose function from non numeric matrices, but since this is a change from 0.2, I thought I'd ask. Is this intended?
Version 0.3.0-prerelease+2306 (2014-03-31 07:12 UTC)
The text was updated successfully, but these errors were encountered: