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

Strip out ArrayView #2978

Closed
stress-tess opened this issue Feb 14, 2024 · 3 comments · Fixed by #3752
Closed

Strip out ArrayView #2978

stress-tess opened this issue Feb 14, 2024 · 3 comments · Fixed by #3752
Assignees
Labels
Technical Debt Rework code for more flexibility or readability

Comments

@stress-tess
Copy link
Member

Strip out the array view code. This was never fully implemented, so it's presence will just be confusing for users who think we currently have multi-dimensional array support. The idea to view a single dimensional array as multi-dimensional was based on numpy but doesn't really make sense in a distributed setting. With the progress on the array api work, there's a possibility we will be able to add support using chapel multi dimensional arrays eventually

@stress-tess stress-tess added the Technical Debt Rework code for more flexibility or readability label Feb 14, 2024
@stress-tess stress-tess self-assigned this Feb 14, 2024
@stress-tess
Copy link
Member Author

This is complicated by the fact that histogram2d and histogramdd have arrayview returns that don't really have a good alternative and I know this is used by akviz. We might need to keep arrayview around until we have some other multi-dim array support

@ajpotts
Copy link
Contributor

ajpotts commented Sep 6, 2024

histogram2d:

In [2]: x = ak.arange(0, 10, 1)

In [3]:  y = ak.arange(9, -1, -1)

In [4]: nbins = 3

In [5]:  h, x_edges, y_edges = ak.histogram2d(x, y, bins=nbins)

In [6]: h
Out[6]: array([array([0 0 3]) array([0 2 1]) array([3 1 0])])

In [7]: type(h)
Out[7]: arkouda.pdarrayclass.pdarray

@ajpotts
Copy link
Contributor

ajpotts commented Sep 6, 2024

histogramdd :

In [8]:  x = ak.arange(0, 10, 1)

In [9]: y = ak.arange(9, -1, -1)

In [10]: z = ak.where(x % 2 == 0, x, y)

In [11]:  h, edges = ak.histogramdd((x, y,z), bins=(2,2,5))

In [12]: h
Out[12]: array([array([array([0 0 0 0 0]) array([1 1 1 1 1])]) array([array([1 1 1 1 1]) array([0 0 0 0 0])])])

In [13]: type(h)
Out[13]: arkouda.pdarrayclass.pdarray


@ajpotts ajpotts self-assigned this Sep 6, 2024
ajpotts added a commit to ajpotts/arkouda that referenced this issue Sep 6, 2024
ajpotts added a commit to ajpotts/arkouda that referenced this issue Sep 6, 2024
ajpotts added a commit to ajpotts/arkouda that referenced this issue Sep 6, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Technical Debt Rework code for more flexibility or readability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants