Skip to content

Commit 07ef729

Browse files
committed
Use internal function
See https://discourse.julialang.org/t/psa-replacement-of-ind2sub-sub2ind-in-julia-0-7/14666/20 on discussion about the deprecation of ind2sub and sub2ind
1 parent 7a3bf19 commit 07ef729

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/node_modules/@stdlib/ndarray/base/ind2sub/benchmark/julia/benchmark.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ julia> out = benchmark();
107107
```
108108
"""
109109
function benchmark()
110-
t = BenchmarkTools.@benchmark ind2sub( (10,10,10), Int32( floor( rand()*1000.0 ) ) ) samples=1e6
110+
t = BenchmarkTools.@benchmark Base._ind2sub( (10,10,10), Int32( floor( rand()*1000.0 ) ) ) samples=1e6
111111

112112
# Compute the total "elapsed" time and convert from nanoseconds to seconds:
113113
s = sum( t.times ) / 1.0e9;

lib/node_modules/@stdlib/ndarray/ind2sub/benchmark/julia/benchmark.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ julia> out = benchmark();
107107
```
108108
"""
109109
function benchmark()
110-
t = BenchmarkTools.@benchmark ind2sub( (10,10,10), Int32( floor( rand()*1000.0 ) ) ) samples=1e6
110+
t = BenchmarkTools.@benchmark Base._ind2sub( (10,10,10), Int32( floor( rand()*1000.0 ) ) ) samples=1e6
111111

112112
# Compute the total "elapsed" time and convert from nanoseconds to seconds:
113113
s = sum( t.times ) / 1.0e9;

0 commit comments

Comments
 (0)