Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cnuernber/dtype-next
Browse files Browse the repository at this point in the history
  • Loading branch information
cnuernber committed Oct 2, 2020
2 parents 32ecb3e + 3cbf22f commit 1ee41a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/tech/v3/datatype.clj
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,14 @@ user> (dtype/make-reader :float32 5 (* idx 2))
Buffer descriptors are a ND description of data. For example, a native
3x3 tensor has a buffer description like thus:
```clojure
{:ptr 140330005614816
:datatype :float64
:endianness :little-endian
:shape [3 3]
:strides [24 8]}
```
This design allows zero-copy transfer between neanderthal, numpy, tvm, etc."
[src-item]
Expand Down
6 changes: 4 additions & 2 deletions src/tech/v3/datatype/emap.clj
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,13 @@


(defn emap
"Elemwise map
"Elemwise map:
1. If input are all scalars, results in a scalar.
2. If any inputs are iterables, results in an iterable.
3. Either a reader or a tensor is returned. All input shapes
have to match.
have to match.
res-dtype is nil it is deduced from unifying the argument datatypes"
[map-fn res-dtype & args]
(let [res-dtype (or res-dtype
Expand Down

0 comments on commit 1ee41a7

Please sign in to comment.