Comments (5)
Confirmed - seems to be a big in NDArray assuming that the second argument is a scalar number (when it could be any shape-compatible array)
It works fine for regular persistent vectors:
(def X [[1 2] [3 4]])
(div X X)
=> [[1 1] [1 1]]
@si14 are you able to take a look and fix this one? I get the suspicion that it may affect some other functions in NDArray too
from core.matrix.
Its probably just me. But as far as I know the matrix division is not defined like that. Because matrix multiplication is not commutative.
There is no way to know whether A/B
means B^-1 * A or A * B^-1 unless a convention is made which I would strongly dislike.
from core.matrix.
@tgoossens - I agree with you that matrices can't be easily divided for the reason that you describe.
However we're talking about a slightly different operation here - div
is for element-wise division. So I think it is reasonably well defined as "elements of a divided by corresponding elements of b"
(with broadcasting as necessary to make the array sizes conformant).
from core.matrix.
My bad. Should have read the documentation better.
from core.matrix.
This is fixed I think by this commit:
e5c7d0a
from core.matrix.
Related Issues (20)
- index-max HOT 3
- `fill` does not preserve type
- Exception when `mmul`ing `fill`ed ndarrays
- Numeric types are unexpectedly coerced HOT 1
- TODO: Not yet implemented: for class clojure.lang.PersistentVector HOT 2
- Why is there no mmul! function ? HOT 2
- API documentation is out of date HOT 4
- Uninitialized object exists on backward branch 108 in clojurescript HOT 11
- Typo in persistent_vector.cljc (vector-dot)? HOT 2
- `pm` (pretty print) undefined in clojurescript HOT 1
- what is the purpose of 'unimplemented' function in utils HOT 2
- Matrix element wise multiplication by column vector HOT 1
- where is react native API document? HOT 1
- Warnings of clashes with Clojure 1.11.0 abs. HOT 6
- apache-commons-matrix not playing well with core.matrix? HOT 1
- New release HOT 2
- pm, get-shape are confused by cells containing sequences in NDArray
- Max size of ndarray matrices? HOT 2
- element-wise equality comparison for non-numbers HOT 2
- Feature request: reverse and rotate functions HOT 2
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 core.matrix.