-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Thank you very much for your hard work developing this very useful library!
I was curious if you have any thoughts or suggestions for speeding up computation time for generating large shapes (specifically using nd_superellipsoid()). I have noticed that as the array shape increases, the computation time dramatically increases as well.
%time rg.nd_superellipsoid((5,5,5), 2, rel_sizes=False).astype(np.int_)
%time rg.nd_superellipsoid((50,50,50), 2, rel_sizes=False).astype(np.int_)
%time rg.nd_superellipsoid((500,500,500), 2, rel_sizes=False).astype(np.int_)
%time rg.nd_superellipsoid((1000,1000,1000), 2, rel_sizes=False).astype(np.int_)
CPU times: user 298 µs, sys: 343 µs, total: 641 µs
Wall time: 4.31 ms
CPU times: user 1.24 ms, sys: 1.43 ms, total: 2.67 ms
Wall time: 5.05 ms
CPU times: user 275 ms, sys: 375 ms, total: 650 ms
Wall time: 650 ms
CPU times: user 1.98 s, sys: 2.95 s, total: 4.93 s
Wall time: 4.94 s
I have been struggling for a while to try to come up with a solution, however I have been unsuccessful so far. Do you believe there can be a way to possibly speed up this calculation? Thank you in advance!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels