[Numpy-discussion] broken numpy.core.tests.test_multiarray.TestScalarIndexing.SetUp
Thu Apr 17 15:34:03 CDT 2008
On 17/04/2008, Robert Kern <email@example.com> wrote:
> On Thu, Apr 17, 2008 at 1:21 PM, Eric Firing <firstname.lastname@example.org> wrote:
> > Arg! Cancel that! I didn't look carefully enough. How embarrassing!
> > Sorry for the noise.
> Don't apologize. That is very odd code. Stefan, is there a reason to
> form a 1-item tuple then do 1-item tuple unpacking everywhere? The
> test works the same after removing the extraneous commas. Anyways,
> I've checked that in.
This is not necessarily a justification, but many tests construct
tuples of test objects which are then unpacked at the beginning of
every function. This is not unreasonable when multiple objects are
A = array([1,2,3])
B = array([4,5,6])
self.d = A, B
A, B = self.d
It's a little less cumbersome than using self.A and self.B inside each
Does it make sense to use a length-1 tuple when there's only one piece
of test data, just for consistency?
More information about the Numpy-discussion