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

Provide dtype='array' fallback #4

Open
rreusser opened this issue Jan 3, 2016 · 0 comments
Open

Provide dtype='array' fallback #4

rreusser opened this issue Jan 3, 2016 · 0 comments

Comments

@rreusser
Copy link
Member

rreusser commented Jan 3, 2016

Of the valid ndarray dtypes, this module does not support 'array'. Does it make sense to provide a fallback that allocates a plain Array if the dtype is array? This would clean up the use of these functions somewhat.

They're trivial but if ndarray-scratch is to implement the canonical zeros, clone, eye, and ones functions, then switching the dtype means having to allocate and fill an array from scratch. If not, then I think ndarray-clone, ndarray-eye, ndarray-ones, and ndarray-zeros need to be split into separate modules that implement this fallback.

(Actually, the main goal is to simplify creation of other modules since there's currently no clean way to allocate an array of the same type as the input.)

@rreusser rreusser changed the title Provide dtype='generic' (Array) fallback Provide dtype='array' fallback Jan 3, 2016
rreusser added a commit to rreusser/ndarray-scratch that referenced this issue Jan 3, 2016
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

1 participant