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

allow upSize for sliced #19

Closed
wilzbach opened this issue Mar 5, 2016 · 2 comments
Closed

allow upSize for sliced #19

wilzbach opened this issue Mar 5, 2016 · 2 comments

Comments

@wilzbach
Copy link
Member

wilzbach commented Mar 5, 2016

It would be quite nice to handle be able to fit an existing slice into an larger one (for sliced).
Have a look at this example from NumPy:

>>> b = np.array([[0, 1], [2, 3]])
>>> b.resize(2, 3) # new_shape parameter doesn't have to be a tuple
>>> b
array([[0, 1, 2],
       [3, 0, 0]])

I imagine sth. like this:

iota(4).sliced!Yes.allowUpsize(2, 3)

(but be aware of the flag "hell" - see #18)

@9il
Copy link
Member

9il commented Mar 5, 2016

This kind of functions may allocate. So they are for the future allocation module

@9il
Copy link
Member

9il commented Aug 9, 2016

This concept is not valied for ndslice. It may be replaced with concatenation or slicing.

@9il 9il closed this as completed Aug 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants