Skip to content

Commit fd1c6fd

Browse files
mestinsombauman
andauthored
Update noteworthy-differences.md (#55490)
- Valid note/tip as of Julia 1.7 --------- Co-authored-by: Matt Bauman <[email protected]>
1 parent 8cdab5b commit fd1c6fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/src/manual/noteworthy-differences.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ may trip up Julia users accustomed to MATLAB:
6262
but in Julia `exp.(A)` applies elementwise and `exp(A)` is the matrix exponential.
6363
* In Julia, the operators [`&`](@ref), [`|`](@ref), and [``](@ref xor) ([`xor`](@ref)) perform the
6464
bitwise operations equivalent to `and`, `or`, and `xor` respectively in MATLAB, and have precedence
65-
similar to Python's bitwise operators (unlike C). They can operate on scalars or element-wise
66-
across arrays and can be used to combine logical arrays, but note the difference in order of operations:
67-
parentheses may be required (e.g., to select elements of `A` equal to 1 or 2 use `(A .== 1) .| (A .== 2)`).
65+
similar to Python's bitwise operators (unlike C). To apply logical boolean operators over an array
66+
(like common uses of MATLAB's `&` and `|`), broadcast Julia's short-circuiting operators `.&&` and `.||`.
67+
For example, to test if the elements in an array `A` are equal to 1 or 2, you can use `A .== 1 .|| A .== 2`.
6868
* In Julia, the elements of a collection can be passed as arguments to a function using the splat
6969
operator `...`, as in `xs=[1,2]; f(xs...)`.
7070
* Julia's [`svd`](@ref) returns singular values as a vector instead of as a dense diagonal matrix.

0 commit comments

Comments
 (0)