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

Added numpy() method #103

Merged
merged 2 commits into from
Dec 27, 2020
Merged

Added numpy() method #103

merged 2 commits into from
Dec 27, 2020

Conversation

alexander-g
Copy link
Contributor

kp.Tensor.data() returns a list of floats which is neither convenient nor efficient for further processing. I have added the .numpy() method which directly returns a numpy array.

@axsaucedo axsaucedo added enhancement New feature or request python labels Dec 27, 2020
@axsaucedo axsaucedo self-requested a review December 27, 2020 10:26
@axsaucedo
Copy link
Member

Very cool @alexander-g, good addition! Would you be able to add a test in the python test in the test folder? Mainly to make sure it works as expected before doing the releases. You will have to add numpy to the reuirements-dev.txt. If you get a chance to add further docuentation that is a plus, but it gets much more fiddly on how to build the docs so we can do that separate to this PR

@axsaucedo
Copy link
Member

Fixes #104

@alexander-g
Copy link
Contributor Author

Added tests.
Docs have to wait until I have figured out how to build them

@axsaucedo
Copy link
Member

Looks good @alexander-g, thanks for the contribution

@axsaucedo axsaucedo merged commit 2e717ad into KomputeProject:master Dec 27, 2020
@alexander-g alexander-g deleted the numpy branch December 28, 2020 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants