This is a collection of OCaml packages that are potentially useful for scientific computing. (Disclaimer: I have only used some of them. But I choose to list all I found useful here for future reference.)
Numerical computing
Owl: The de facto numerical computing library for OCaml. Probably the best maintained OCaml numerical computing package at this moment.gsl: OCaml bindings to the GNU Scientific Library.lacaml: OCaml bindings to BLAS and LAPACK.
Machine learning
torch-ocaml: OCaml bindings for PyTorch.tensorflow-ocaml: OCaml bindings for TensorFlow.
Data visualization
Owlcontains functions to call an external plotting library (PLplot).ocaml-matplotlibOCaml bindings to Pythonmatplotlib.
Interactive programming
utop: An enhanced OCaml REPL.ocaml-jupyter: OCaml kernel for Jupyter Notebook.
Foreign function interfaces (FFI)
ctypes: Modern C FFI in OCaml developed by the OCaml Labs at the University of Cambridge. Note thatctypes-foreignis also required if you need to useCtypesinteractively.py.ml: OCaml bindings for Python implemented using C stubs. This package supports both Python 2 and 3.lymp: Allows OCaml to interact with Python through a Python process. Need to identify the interpreter command to execute it.ocaml-rs: Allows OCaml to interact with extensions written in Rust without C stubs.rust-ocaml-derive(WARNING: experimental): Two-way FFIs between OCaml and Rust. Provides theocaml_ffimacro in Rust that reduces the amount of boilerplate code to write.
Development tools
dune: The official build system for OCaml.merlin: Context-extensive autocompletion for OCaml in Vim and Emacs.opam-depext: Allows OPAM to invoke the system package manager (e.g.,brewon macOS) for automated installation.core_bench: Micro-benchmarking for OCaml.ocamlformat: An autoformatter for OCaml code.ocamlfind: A library manager for OCaml.ocamlbuild: A build system for OCaml. This package can be used to compile OCaml to native code. But check your use case before you use it, becausedunemay suffice for most cases.vscode-reasonml: OCaml and ReasonML support for Visual Studio Code.
