(array, shape)
Asserts that an array has the given shape.
Asserts that an array has the given shape.
Asserts that an array has the given shape .
def assert_shape_equals(array, shape):
  """Asserts that an array has the given shape."""
  assert array.shape == shape, (
      'Invalid shape {}; expected {}.'.format(array.shape, shape)
  )
def assert_shape_equals ( array , shape ) : assert array . shape == shape , ( 'Invalid shape {}; expected {}.' . format ( array . shape , shape ) )