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

Fix typo #390

Merged
merged 3 commits into from Apr 14, 2020
Merged

Fix typo #390

merged 3 commits into from Apr 14, 2020

Conversation

matteodg
Copy link
Member

Very small fix: channels() is supposed to return -1 when sizes.length!=3, but instead is returning 1.

Out of curiosity is there a reason why in case of sizes.length==2 we do not have rows() and cols() returning respectively size[0] and size[1]?

@saudet
Copy link
Member

saudet commented Apr 13, 2020

No reason in particular. I guess that's another bug introduced by @HGuillemet. Please fix it? :)

@HGuillemet
Copy link
Contributor

The 1 instead of -1 is a typo indeed. But at least it doesn't trigger a SIGSEGV like the previous value sizes[2] written by @saudet could :P

For the case sizes.length == 2 I don't know. I don't think there is a logic we could stick to to find proper values for these shortcut methods. I'd vote for deprecating or removing them.
In the general n-dimensional case, the meaning of each dimension could be anything : with or without channel, NHWC/CHWN/NCHW...

@matteodg
Copy link
Member Author

For the case sizes.length == 2 I don't know. I don't think there is a logic we could stick to to find proper values for these shortcut methods. I'd vote for deprecating or removing them.
In the general n-dimensional case, the meaning of each dimension could be anything : with or without channel, NHWC/CHWN/NCHW...

I agree, I vote too to deprecate them as they can be misleading: I was tripped up as well moving from a 2D to a 3D world of coordinates 😄

@saudet saudet merged commit 0d39184 into bytedeco:master Apr 14, 2020
@matteodg matteodg deleted the fix-typo-on-indexers-channels branch April 14, 2020 02:23
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.

None yet

3 participants