def test_extract_array_1d_trim():
 assert np.all((extract_array(np.arange(4), (2,), (0,), mode=u'trim') == np.array([0])))
 for i in [1, 2, 3]:
  assert np.all((extract_array(np.arange(4), (2,), (i,), mode=u'trim') == np.array([(i - 1), i])))
 assert np.all((extract_array(np.arange(4.0), (2,), (4,), mode=u'trim') == np.array([3])))

def test_extract_array_1d_trim ( ) : assert np . all ( ( extract_array ( np . arange ( 4 ) , ( 2 , ) , ( 0 , ) , mode = u'trim' ) == np . array ( [ 0 ] ) ) ) for i in [ 1 , 2 , 3 ] : assert np . all ( ( extract_array ( np . arange ( 4 ) , ( 2 , ) , ( i , ) , mode = u'trim' ) == np . array ( [ ( i - 1 ) , i ] ) ) ) assert np . all ( ( extract_array ( np . arange ( 4.0 ) , ( 2 , ) , ( 4 , ) , mode = u'trim' ) == np . array ( [ 3 ] ) ) )
extract 1 d arrays .