-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce ifloor and iceil functions [closes #234].
Also: - add a number of vectorized functions on darrays - shorten a couple of functions in versions.j
- Loading branch information
1 parent
5713db9
commit abc7546
Showing
5 changed files
with
35 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -750,10 +750,13 @@ function map_vectorized(f, A::SubOrDArray) | |
T, size(A), distdim(A), procmap(A)) | ||
end | ||
|
||
for f = (:ceil, :floor, :trunc, :round, :iround, :itrunc, | ||
:sqrt, :cbrt, :sin, :cos, :tan, :sinh, :cosh, :tanh, | ||
:asin, :acos, :atan, | ||
:log, :log2, :exp, :expm1) | ||
for f = (:ceil, :floor, :trunc, :round, | ||
:iceil, :ifloor, :itrunc, :iround, | ||
:sqrt, :cbrt, :log, :log2, :exp, :expm1, | ||
:sin, :cos, :tan, :cot, :sec, :csc, | ||
:sinh, :cosh, :tanh, :coth, :sech, :csch, | ||
:asin, :acos, :atan, :acot, :asec, :acsc, | ||
:acoth, :asech, :acsch, :sinc, :cosc, :atan2) | ||
@eval ($f)(A::SubOrDArray) = map_vectorized($f, A) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
JeffBezanson
Member
|
||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i'm tempted to offer you a nickel for every time somebody needs to compute the asech of a darray :)