Import function


I use some function supported by scipy or numpy in python version.
I am working on building the online version.
Here is the list that I import

  • import scipy
  • from scipy import stats
  • from numpy.random import default_rng

Does anyone know how to covert into JavaScript?
The function that I import from scipy is tricky[1].
I don’t know how to implement it in JavaScript.
The functions are numpy.random.Generator.choice, Random Generator, numpy.ones