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

split_into_nhot() doesn't work properly on views #1507

Closed
oleksiyskononenko opened this issue Dec 26, 2018 · 0 comments · Fixed by #1509
Closed

split_into_nhot() doesn't work properly on views #1507

oleksiyskononenko opened this issue Dec 26, 2018 · 0 comments · Fixed by #1509
Assignees
Labels
bug Any bugs / errors in datatable; however for severe bugs use [segfault] label views Issues that are specific to "view" frames only
Milestone

Comments

@oleksiyskononenko
Copy link
Contributor

oleksiyskononenko commented Dec 26, 2018

split_into_nhot() works just fine on the entire frame and views that start from zero row

>>> import datatable as dt
>>> from datatable import split_into_nhot
>>> df = dt.Frame(["a", "b"])
>>> split_into_nhot(df)
      a   b
---  --  --
 0    1   0
 1    0   1
>>> split_into_nhot(df[0,:])
      a
---  --
 0    1

If a view doesn't start at the zero row, it returns wrong results

>>> split_into_nhot(df[1,:])
      a
---  --
 0    1

Expected output in this case is

>>> split_into_nhot(df[1,:])
      b
---  --
 0    1

Need this to be fixed to finalize #1499.

@oleksiyskononenko oleksiyskononenko added the bug Any bugs / errors in datatable; however for severe bugs use [segfault] label label Dec 26, 2018
@st-pasha st-pasha added the views Issues that are specific to "view" frames only label Dec 26, 2018
@st-pasha st-pasha added this to the Release 0.8.0 milestone Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Any bugs / errors in datatable; however for severe bugs use [segfault] label views Issues that are specific to "view" frames only
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants