Scientific libraries for Lua? [closed]
Asked Answered
H

6

23

Are there any scientific packages for Lua comparable to Scipy?

Hysterical answered 23/12, 2008 at 4:25 Comment(0)
V
3

There is the basis for one in Numeric Lua.

Vitellus answered 23/12, 2008 at 4:36 Comment(2)
What about a plotting library for Lua?Ambi
I wrote a Lua wrapper for Dislin for Lua 5.1, but there are probably better options today. A Google search for "lua plot" shows a few options: lua-gnuplot, Torch, and lua_flot.Vitellus
S
12

You should try Torch7 (github).

Torch7 has a very nice and efficient vector/matrix/tensor numerical library with a Lua front-end. It also has a bunch of functions for computer vision and machine learning.

It's pretty recent but getting better quickly.

Scotsman answered 17/5, 2012 at 7:30 Comment(3)
While Torch7 is for general use, currently most of the work has been done for neural networks. Also, while it does support gnuplot, there isn't anything like matplotlib for it. I use Torch7, but still go back to Python for analysis and plotting. Hopefully that can change.Glorious
Also not officially supported on Windows?Kiser
there is github.com/facebook/iTorch which uses ipython plotting backedInkblot
C
7

One can always use Lunatic Python and access scipy inside lua.

> require("python")
> numpy = python.import("numpy")
> numpy.array ... etc ..
Caputo answered 23/12, 2008 at 10:33 Comment(1)
And also, you could try lutorpy for converting between lua/torch and numpy array, so you can use scipy with torch.Calandra
T
5

You have some options:

  • Numeric Lua - C module for Lua 5.1/5.2, provides matrices, FFT, complex numbers and others
  • GSL Shell - Modification of Lua (supports Lua libraries) with a nice syntax. Provides almost everything that Numeric Lua does, plus ODE solvers, plotting capabilities, and other nice things. Has a great documentation.
  • SciLua - Pure LuaJIT module. Aims to be a complete framework for scientific computing in Lua. Provides vectors and matrices, random numbers / distributions, optimization, others. Still in early development.
  • Lua Numerical Algorithms - Pure LuaJIT module (uses blas/lapack via LuaJIT FFI). Provides matrices / linear algebra, FFT, complex numbers, optimization algorithms, ODE solver, basic statistics (+ PCA, LDA), and others. Still in early development, but has a somewhat complete documentation and test suits.
Tailband answered 13/9, 2013 at 1:33 Comment(1)
Numeric Lua is deprecated in favour of torch7Inkblot
V
3

There is the basis for one in Numeric Lua.

Vitellus answered 23/12, 2008 at 4:36 Comment(2)
What about a plotting library for Lua?Ambi
I wrote a Lua wrapper for Dislin for Lua 5.1, but there are probably better options today. A Google search for "lua plot" shows a few options: lua-gnuplot, Torch, and lua_flot.Vitellus
T
3

I'm not sure if it is comparable to Scipy, but there is GSL Shell which is based on LuaJIT and GNU Scientific Library, which offers many numerical algorithms and vector/matrix linear algebra operations.

Teagan answered 13/2, 2012 at 1:20 Comment(0)
M
2

There's a Numpy-like extension for Lua which runs without dependencies at

https://github.com/jzrake/lunum

In the future it will provide FFT's and linear algebra like Numpy+Scipy. Presently it supports numeric array manipulation like in Numpy.

Maricamarice answered 12/2, 2012 at 22:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.