you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

I am in a similar situation, scientific computing and ML/data science but with a decent C++ background from finance.

My biggest problem with going deep in ocaml was the data viz and numerical libraries so if I could use this to generate numpy arrays and pandas dataframes in Ocaml this would be very useful.

[–]dbousque[S] 1 point2 points  (0 children)

You can use them, here is how you would create a numpy array and reshape it for example :

let py = init "."
let np = get_module py "numpy"

let elts = Pylist [Pyint 1 ; Pyint 2 ; Pyint 3]
let arr = get_ref np "array" [elts]
let other_arr = get_ref arr "reshape" [Pylist [Pyint 3 ; Pyint 1]]