Skip to content
This repository was archived by the owner on Jul 15, 2025. It is now read-only.

Conversation

@rnett
Copy link
Contributor

Renames Shape.size to Shape.get and add a toListOrNull method. Was part of tensorflow/java#165.

@rnettrnett mentioned this pull request May 15, 2021
Copy link
Contributor

@CraigacpCraigacp left a comment

Choose a reason for hiding this comment

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

Could you provide some rational for why the method is renamed? Does kotlin treat get methods specially, or is there some conflict with size?

@rnett
Copy link
ContributorAuthor

rnett commented May 17, 2021

Yeah, Kotlin will automatically treat get as an operator, and rather than adding an extension in the Kotlin API Karl suggested I just change it here. Avoids overloading the meaning of size, too.

Copy link
Contributor

@CraigacpCraigacp 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 I'm fine with this, but I'll let @karllessard merge it in case he has comments.

@rnettrnett requested a review from karllessardMay 18, 2021 20:43
@karllessardkarllessard merged commit d2aed4a into tensorflow:mainMay 18, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@rnett@Craigacp@karllessard