Sure. This was just a side note. I would expect that a "notation" A*B/B ==
A to be always true (except for division by zero of course), since division
the inverse process of multiplication, like for scalar values (a*b/b == a
or A.*B./B .== A).
Am Montag, 14. April 2014 00:38:57 UTC+2 schrieb
Hi again,
Am Sonntag, 6. April 2014 01:33:16 UTC+2 schrieb Cristóvão Duarte Sousa:
Since julia aims at technical problems, with lots of linear algebra, it
> makes some sense to use * for matrix multiplication (everyday linear
> algebra) and use something else (.* borrowed from Matlab) to the le
Sorry, the dot makes it not clear, but even more confusing. Actually, ".*"
reads like dot (.) product (*).
E.g. in Python/Numpy and IDL +,-,*,/ are used for element-wise operation.
Moreover,
julia> [1 2 3] + [1 2 3]
1x3 Array{Int64,2}:
2 4 6
julia> [1 2 3] * [1 2 3]
DimensionMismatch("*")
The
bool(5) is true
and bool(0) is false
(and bool(None) doesn't work in contrast to python)
So in Julia, C, and Python it is the same.
But unfortunately the "if" statement in Julia does not make the boolean
conversion.
I know that `if 5` works in Python and in C. Many languages choose to make
>
There is no need for a "then" key word. Use brackets for readability
if (x<0) x=-x end
I don't like the "then" keyword in IDL.
But I love it the python way:
if x<0: x = -x
So instead ask for removing the end keyword and using indentation.
The && option seems just like a work around for this prop
Dear Jake,
Thanks, I didn't know. However, they are not fully equivalent:
julia> divrem(-7.5, 4)
(-1.0, -3.5)
>>> divmod(-7.5,
4)
(-2.0, 0.5)
When I need it, I usally need the latter version.
So still a divmod could be implemented.
Hi Leah,
I fully understand that syntax changes are difficult. Nevertheless, I want
to encourage to do those, which I think are in the spirit of the Julia
philosophy (http://julialang.org/blog/2012/02/why-we-created-julia/):
- "we want the language to be simple and clean"
Still Julia is a quite
Hi Julia users,
Maybe you want to support me with my wish list.
Here it is:
- end statement: remove it (ala python) and use indentation, the code will
be shorter and cleaner
- case/switch: include it (missing in python)
- array indexing: introduce with negative number -1,-2,... (instead of or