Hi Justin!



 lelouedec:

having a very high number of points and learn some float array dropping part of it,


One general approach – that may not work for your use case – for
making integer stuff differentiable is to blend (interpolate) neighboring
integers together.
Let’s say that a Fibonacci sphere with a certain number of points (say
600) leads to some result, f (600), and a sphere with 601 points leads
to some other result, f (601).
You could have seed_nb to be a floating-point number (rather than
an integer) and then define the corresponding result, f (seed_nb)
via interpolation:
f (600.3)  =  0.7 * f (600)  +  0.3 * f (601)

Whether this could make sense depends on the specifics or your
use case, but it does give you an expression that can be usefully
differentiated with respect to a floating-point seed_nb.
Best.
K. Frank