Skip to content

Commit 40f772d

Browse files
committed
Fixes #440
1 parent 749a954 commit 40f772d

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# Changelog
2+
# 7.040
3+
* Fix for [issue 450](https://github.com/techascent/tech.ml.dataset/issues/450) - emapped columns could reduce as
4+
a different type than declared in the emap declaration.
5+
* Small perf improvements for unique-by.
6+
27
# 7.039
38
* Fix error in dtype-next/native-buffer/native-buffer->byte-array
49

deps.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{:paths ["src" "resources" "target/classes"]
22
:deps {;;org.clojure/clojure {:mvn/version "1.11.1"}
3-
cnuernber/dtype-next {:mvn/version "10.128"}
3+
cnuernber/dtype-next {:mvn/version "10.129"}
44
techascent/tech.io {:mvn/version "4.31"
55
:exclusions [org.apache.commons/commons-compress]}
66
org.apache.datasketches/datasketches-java {:mvn/version "4.2.0"}

test/tech/v3/dataset_test.clj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,15 @@
17751775
(ds/column :a)
17761776
(vec)))))
17771777

1778+
(deftest issue-450-incorrect-distinct
1779+
(is (= 2
1780+
(->
1781+
(ds/->dataset {:y [:a :b :b :a :a :a :b :b]})
1782+
(ds/categorical->number [:y] [] :float64)
1783+
:y
1784+
distinct
1785+
count))))
1786+
17781787
(comment
17791788
(require '[criterium.core :as crit])
17801789
(def data (vec (repeatedly 100000 (fn [] {:a (rand-int 20) :b (rand) :c (rand)}))))

0 commit comments

Comments
 (0)