def test_box2D_horMin(self): xs, vertAxis = self._box2DSetup() box = directtools.box2D(xs, vertAxis, horMin=0) expected = numpy.tile(numpy.array([0, 2, 4, 5]), (3, 1)) numpy.testing.assert_equal(xs[box], expected)
def test_box2D_defaults(self): xs, vertAxis = self._box2DSetup() vertAxis = numpy.array([-2, -1, 0, 1]) box = directtools.box2D(xs, vertAxis) numpy.testing.assert_equal(xs[box], xs)
def test_box2D_vertMax(self): xs, vertAxis = self._box2DSetup() box = directtools.box2D(xs, vertAxis, vertMax=-1) expected = numpy.tile(numpy.array([-1, 0, 2, 4, 5]), (1, 1)) numpy.testing.assert_equal(xs[box], expected)
def test_box2D_horMin(self): xs, vertAxis = self._box2DSetup() box = directtools.box2D(xs, vertAxis, horMin=0) expected = numpy.tile(numpy.array([0, 2, 4, 5]), (3, 1)) numpy.testing.assert_equal(xs[box], expected)
def test_box2D_defaults(self): xs, vertAxis = self._box2DSetup() vertAxis = numpy.array([-2, -1, 0, 1]) box = directtools.box2D(xs, vertAxis) numpy.testing.assert_equal(xs[box], xs)
def test_box2D_vertMax(self): xs, vertAxis = self._box2DSetup() box = directtools.box2D(xs, vertAxis, vertMax=-1) expected = numpy.tile(numpy.array([-1, 0, 2, 4, 5]), (1, 1)) numpy.testing.assert_equal(xs[box], expected)