Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

change interface of point/transforms #808

Merged
merged 4 commits into from
Apr 3, 2019

Conversation

yuyu2172
Copy link
Member

@yuyu2172 yuyu2172 commented Feb 21, 2019

Assume point as [(K, 2)] instead of (K, 2).

@yuyu2172 yuyu2172 added this to the 0.13 milestone Feb 21, 2019
.. csv-table::
:header: name, shape, dtype, format

:obj:`point`, ":math:`[(K, 2)]` or :math:`(R, K, 2)`", \
Copy link
Member

Choose a reason for hiding this comment

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

In Args section, ndarray comes first.

point (~numpy.ndarray or list of arrays)

I prefer to use the same order here.

:obj:`point`,  ":math:`(R, K, 2)` or :math:`[(K, 2)]`"

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you

np.testing.assert_equal(out, point_expected)

def test_flip_point_list(self):
point = [np.random.uniform(
low=0., high=32., size=(12, 2))]
Copy link
Member

Choose a reason for hiding this comment

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

How about using point with more than one samples?

Copy link
Member Author

Choose a reason for hiding this comment

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

OK

def test_flip_point_list(self):
point = [
np.random.uniform(low=0., high=32., size=(12, 2)),
np.random.uniform(low=0., high=32., size=(12, 2)),
Copy link
Member

Choose a reason for hiding this comment

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

I prefer to use two arrays of different shapes (e.g. (12, 2) and (10, 2)).

def test_resize_point_list(self):
point = [
np.random.uniform(low=0., high=32., size=(12, 2)),
np.random.uniform(low=0., high=32., size=(12, 2))
Copy link
Member

Choose a reason for hiding this comment

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

ditto.

def test_translate_point_list(self):
point = [
np.random.uniform(low=0., high=32., size=(10, 2)),
np.random.uniform(low=0., high=32., size=(10, 2))
Copy link
Member

Choose a reason for hiding this comment

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

ditto.

@Hakuyume Hakuyume merged commit cabfd07 into chainer:master Apr 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants