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

NDArray factories #14

Open
Zelenyy opened this issue Sep 8, 2018 · 2 comments
Open

NDArray factories #14

Zelenyy opened this issue Sep 8, 2018 · 2 comments
Labels
feature A new feature request

Comments

@Zelenyy
Copy link
Member

Zelenyy commented Sep 8, 2018

Add aliases for creation NDarray: zeros, ones, linspace, logspace, repeat, eye, arange,

@altavir
Copy link
Member

altavir commented Jan 21, 2019

zero and one are by default present in NDField and are in most cases singleton values. Others should be added as extension functions for NDField. Contribution is welcome.

@altavir
Copy link
Member

altavir commented May 2, 2019

Current design guideline is to use structure companion for factories like Buffer.real. It is possible to implement additional factories in companions or to add them as extensions later like fun Buffer.Companion.arrange(){}. Also since it is possible to use functions in structure generators, I don't see a point in creating a lot of factories, when you can use lambda to customize it.

I will add some factory methods for matrices, because they have features which could be inferred during construction.

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

No branches or pull requests

2 participants