Comments (2)
Good comment, really appreciate it. Indeed, interoperation on different number types is really desirable when fast prototyping. Most of the time in my research, I simply want to try something in utop
quickly.
That is actually the motivation of Ext
module in Owl. With Ext
module, you can do basic math operations on different number types. Please refer to this tutorial: Operators and Ext Module.
But the price we pay for this convenience is: weaker type checking (by wrapping everything in one type) and performance degradation (due to the big match
). I haven't really benchmarked about performance degradation yet. However, Ext
is just an option for you to do fast prototyping. You can always use the corresponding functions in Owl for better type checking and performance. I think the the ultimate solution is whenever Modular Implicits is included in OCaml official release.
Currently, this interoperation only happens between dense data structures, but Sparse structure is definitely on my todo list. Actually, there is already placeholder in this file for the feature you suggested, I just need to implement the corresponding modules in that file.
Before this happens, I still need to refactor the sparse module a bit (dense module takes me most of the time at the moement).
from owl.
in my opinion abstracting sparse/dense is tricky. almost by definition, sparse matrices are big -- otherwise one would simply use dense matrices. but for big objects, you really want to be explicit about what you're doing to them, whether new memory is allocated etc. automating this is asking for unexpected out-of-memory situations.
from owl.
Related Issues (20)
- Precedence and associativity with infix operators
- Not all modules have aliases
- Ndarray sum keep_dims:true does not always keep dimensions
- Invalid_argument("index out of bounds") with Algodiff HOT 3
- Painful installation on MacOS HOT 4
- Can't build a module using Owl_stats_dist in dune, works in utop (arm64 mac) HOT 1
- How do I use gaussian_pdf in Owl.Arr? HOT 2
- The setter function for matrices in Owl_algodiff.D.Mat does not work HOT 2
- Cannot install owl-1.1 through opam because of `unmet availability conditions` HOT 2
- `libgfortran.so` not linked and causing compilation error HOT 8
- Cephes build warnings on Arch Linux
- Incorrect `Owl_const.min_float64` value? HOT 1
- Owl_dataframe shouldn' t use 'string_of_float' HOT 1
- Documentation is not in sync with current way plots are working
- OCaml cannot fins owl package HOT 1
- ssqr_diff' modifies inputs in place HOT 2
- Failure to load datasets for neural nets HOT 1
- Broken link to Algodiff module. HOT 2
- Exponential regression -- incorrect case HOT 1
- Test fails with GCC 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from owl.