Using Owl-Base only?

I’m looking into using owl-base for manipulating arrays. To avoid the dependencies I wanted to stay away from full-fledged owl. Is there an ergonomic way to use owl-base on its own? In the API all I could find was a large collection of low-level functions…

1 Like

The API is messy because it allows for so many different kinds of arrays. What you want is here. owl-base is great on its own.

1 Like

thanks! I guess I open that module then? Still it seems the full Owl has an easier to navigate API, and I wonder if it would not be possible to give Owl-base the same user-facing convenience?

[EDIT]

Sorry for just uttering wishes here, but I think that factoring out from owl-base a numpy-like library for array manipulation without bells and whistles which is

  • pure-ocaml, low-dependency
  • well-documented, e.g. docstrings visible with :MerlinDocument for all functions
  • discoverable
  • including toplevel support

would be a really nice contribution to the ocaml ecosystem.

1 Like

Incidentally, is there a Format compatible pretty printer for arrays or matrices in Owl-base somewhere? I only found a print function which did not seem to interface with a formatter.

Ah, Owl_pretty I see it now.

After some hours I feel like an archaeologist of some sort digging for usable bits. At last, by comparing with full Owl, I found that the Owl_base_dense_ndarray.Operator module apparently does not have the slicing syntax, which Owl_dense_ndarray.Operator has. Also, I did not find a way to use the functor Owl_operator.Make_Extend to generate them as I could not figure out what module has the required input signature.

bottom line: no slicing/indexing for me :frowning:
I would not recommend Owl-base for productive work for the time being.

It’s definitely not intuitive. I feel like Owl took too much on, rather than focusing on something specific like a numpy for OCaml.

3 Likes