Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select-rows returns first row multiplied when pass number as a selector #85

Closed
genmeblog opened this issue May 29, 2020 · 1 comment
Closed

Comments

@genmeblog
Copy link

I would expect (select-rows ds number) acts as (select-rows ds [number])

(def DS (ds/->dataset (take 50 (cycle [{:a 1} {:b 2} {:a 3 :b 5}]))))

(ds/select-rows DS [11])
;; => _unnamed [1 2]:
;;    | :a | :b |
;;    |----|----|
;;    |  3 |  5 |

(ds/select-rows DS 11)
;; => _unnamed [11 2]:
;;    | :a | :b |
;;    |----|----|
;;    |  1 |    |
;;    |  1 |    |
;;    |  1 |    |
;;    |  1 |    |
;;    |  1 |    |
;;    |  1 |    |
;;    |  1 |    |
;;    |  1 |    |
;;    |  1 |    |
;;    |  1 |    |
;;    |  1 |    |
@cnuernber
Copy link
Collaborator

Yes, that matches numpy and the tensor select api. A numeric constant means select exactly that row.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants