From a75de42145b04a9d8bf024b2d0c389dae78e07f1 Mon Sep 17 00:00:00 2001 From: Michael Helton Date: Wed, 2 Nov 2022 12:27:58 -0400 Subject: [PATCH] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c6b795..a3e38d7 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,11 @@ In general, this provides a fast way to generate a sequence of Bessel functions julia> @btime besselj(0:100, 50.0) 398.095 ns (1 allocation: 896 bytes) ``` -This function will allocate so it is recommended that you calculate the Bessel functions at the top level of your function outside any hot loop. +This function will allocate so it is recommended that you calculate the Bessel functions at the top level of your function outside any hot loop. You can also call the mutating function on your preallocated vector `Bessels.besselj!(out, nu, x)` +```julia +a = zeros(10) +out = Bessels.besselj!(a, 1:10, 1.0) +``` ### Support for negative arguments