Closed gao-hongnan closed 2 years ago
| Is there a good design (pythonic way) to only check the type once?
I think a bigger question ought to be: is it the intended design to check the type for x
once?
What if x
is changed between the only_once_type_check
and subsequent_processing
?
Or does it make sense to check type on demand, to ensure correctness?
This pull request addresses the issue at https://github.com/aisingapore/PeekingDuck-Private/issues/97.
utils.bbox.transforms
to allow multi-dimensional input by using the ellipsis operator[..., ]
.float
. The former will ensure no mutation to original inputs whereas the latter ensures theoutputs
will be casted as afloat
.