Skip to content

Commit

Permalink
8.030
Browse files Browse the repository at this point in the history
  • Loading branch information
cnuernber committed Sep 19, 2021
1 parent e86452e commit 8b955b4
Show file tree
Hide file tree
Showing 38 changed files with 56 additions and 51 deletions.
2 changes: 1 addition & 1 deletion docs/buffered-image.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/cheatsheet.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/datatype-to-dtype-next.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/dimensions-bytecode-gen.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/overview.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.argops.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.bitmap.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.convolve.html

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/tech.v3.datatype.datetime.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.errors.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.ffi.clang.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.ffi.graalvm.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.ffi.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.functional.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.gradient.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.jna.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.jvm-map.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.list.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.mmap-writer.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.mmap.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.native-buffer.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.nippy.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.packing.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.reductions.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.rolling.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.sampling.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.struct.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.datatype.wavelet.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.libs.buffered-image.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.libs.neanderthal.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.parallel.for.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.tensor.color-gradients.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.tensor.dimensions.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tech.v3.tensor.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject cnuernber/dtype-next "8.030-SNAPSHOT"
(defproject cnuernber/dtype-next "8.030"
:description "A Clojure library designed to aid in the implementation of high performance algorithms and systems."
:url "http://github.com/cnuernber/dtype-next"
:license {:name "EPL-2.0"
Expand Down
19 changes: 12 additions & 7 deletions src/tech/v3/datatype/datetime/operations.clj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[tech.v3.datatype.argops :as argops]
[tech.v3.datatype.errors :as errors]
[clojure.set :as set])
(:import [tech.v3.datatype LongReader ObjectReader Buffer
(:import [tech.v3.datatype DoubleReader LongReader ObjectReader Buffer
BinaryOperator BinaryOperators$ObjectBinaryOperator
BinaryOperators$LongBinaryOperator]
[java.time.temporal ChronoUnit Temporal ChronoField
Expand Down Expand Up @@ -40,14 +40,20 @@
(boolean (millisecond-datatypes dtype)))



(defn- millisecond-reader
^LongReader [convert-fn datatype data]
;; Because we are converting from object data to a numeric representation we have to account
;; for the fact that objects may be nil (in the case of missing data) which leads us to
;; have to use doubles even though milliseconds are long quantities throughout the system.
^DoubleReader [convert-fn datatype data]
(let [data (dtype-base/->reader data)]
(reify LongReader
(reify DoubleReader
(elemwiseDatatype [rdr] datatype)
(lsize [rdr] (.lsize data))
(readLong [rdr idx]
(unchecked-long (convert-fn (.readObject data idx)))))))
(readDouble [rdr idx]
(if-let [obj-data (.readObject data idx)]
(double (convert-fn obj-data))
Double/NaN)))))


(defn- vectorized-dispatch-millisecond-reader
Expand Down Expand Up @@ -260,8 +266,7 @@
#{:min :max :mean :median :standard-deviation
:quartile-1 :quartile-3}
#{:min :max :mean :median :quartile-1 :quartile-3})
stats-data (dfn/descriptive-statistics stats-set (assoc options :nan-strategy :keep)
numeric-data)]
stats-data (dfn/descriptive-statistics stats-set options numeric-data)]
(->> stats-data
(map (fn [[k v]]
[k
Expand Down

0 comments on commit 8b955b4

Please sign in to comment.