Code Monkey home page Code Monkey logo

Comments (8)

nilsbecker avatar nilsbecker commented on May 13, 2024 1

hi, first of all it's great that you are addressing the lack of numerical computing infrastructure on ocaml!

the thing that i am missing most on the roadmap is something equivalent to the foundation of numpy: a multidimensional array that is a pleasure to manipulate, with slicing, (fancy) indexing, broadcasting, views, transpose, copy, whatnot. to my mind having that would be the start of tying the ocaml ecosystem together for numerics. matrices and matrix manipulation would then apply to two-dimensional (slices of) (sub)arrays.

are you planning on something like that? would the current design be compatible with such a type if someone builds something like that based on bigarray.genarray?

actually, i now saw that rleonid is indeed thinking about these thinks in his oml library. for the moment, it's based on float array array (at least partly) but it seems the idea is also to move to a general type. how do you the relation of oml to owl ?

from owl.

nilsbecker avatar nilsbecker commented on May 13, 2024 1

another thought: when i produce data with ocaml i often want to plot it using matplotlib (i think it's great that you are providing native plotting options but it's probably fair to say that that can't get as feature complete as mpl anytime soon) so it would be good to have easy to use export of matrices and/or vectors to a numpy-digestible format. i sometimes do memmapping and building a numpy array from the memmapped file but i find it quite cumbersome to handle.

or even to call out to python in some way (but that again seems like a big project)

from owl.

ryanrhymes avatar ryanrhymes commented on May 13, 2024

Thanks Sergei, this is a good suggestion. I will sketch out a future plan and specify some TODOs in the following days.

from owl.

ryanrhymes avatar ryanrhymes commented on May 13, 2024

OK, here is a list of crude ideas: https://github.com/ryanrhymes/owl/wiki/Future-Plan

The plan can be adjusted based on the feedback, so all comments are welcome.

from owl.

ryanrhymes avatar ryanrhymes commented on May 13, 2024

N-dimensional array is a good suggestion and we definitely need that in owl. I will add it to the roadmap later. Thank you very much.

oml is a very cool library focusing more on stats (learning) if my understanding is correct, whereas Owl plans to target more general numerical operations (matrices, linear algebra, optimisation, and etc.). There is certain overlap at the moment but I guess they will diverge more at some point.

from owl.

ryanrhymes avatar ryanrhymes commented on May 13, 2024

Matplotlib is already very mature but heavily integrated with Python. I think the best solution is to interface with Matplotlib with standard file format (as you suggested) which should be doable.

from owl.

nilsbecker avatar nilsbecker commented on May 13, 2024

hi, about the nd-array related work in oml i found this: rleonid/oml#166 . i guess the direction of oml is more statistics but they are forced to provide the array infrastructure to do that. i think there also was some talk about splitting off the actual statistics from the linear algebra in oml.

from owl.

ryanrhymes avatar ryanrhymes commented on May 13, 2024

Cool, thanks. I read the thread you referred to and it seems we share a lot of common concerns. At this moment, I probably only focus on real and complex numbers.

Regarding the plotting, you can currently save matrices to csv files then import in numpy (although not very efficient comparing to marshal). I plan to use HDF5 in the future. But please do let me know if there are better (e.g., more efficient) solutions.

from owl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.