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

Rename read/write to copyTo/From #19

Merged
merged 2 commits into from
Feb 20, 2024
Merged

Conversation

karllessard
Copy link
Collaborator

Renames NdArray.read(dstBuffer) to NdArray.copyTo(dstBuffer), and NdArray.write(srcBuffer) to NdArray.copyFrom(srcBuffer), to make more obvious the direction of the data flow of these methods.

This is somehow related to tensorflow/java#510, though I just modified the signature in NdArray and left the one in DataBuffer intact, since the read/write methods of these entities tries to replicate the behaviour of the get/put methods of the Java NIO buffers.

@karllessard karllessard requested a review from Craigacp February 19, 2024 02:47
Copy link
Collaborator

@Craigacp Craigacp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth updating the javadoc with the version that had the old names in, otherwise it looks good.

ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java Outdated Show resolved Hide resolved
ndarray/src/main/java/org/tensorflow/ndarray/NdArray.java Outdated Show resolved Hide resolved
@karllessard karllessard merged commit 369b05a into tensorflow:main Feb 20, 2024
2 checks passed
@karllessard karllessard deleted the rename branch February 20, 2024 02:47
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

Successfully merging this pull request may close these issues.

2 participants