code: def test_fail_on_direct_construction(self):
      # See http://docs.scipy.org/doc/numpy-1.10.0/user/basics.subclassing.html#simple-example-adding-an-extra-attribute-to-ndarray  # noqa
  
      with self.assertRaises(TypeError) as e:
          np.ndarray.__new__(LabelArray, (5, 5))
  
      self.assertEqual(
          str(e.exception),
          "Direct construction of LabelArrays is not supported.",
      )
  
imports: from itertools import product
  from operator import eq, ne
  import warnings
  import numpy
  from toolz import take
  from catalyst.lib.labelarray import LabelArray
  from catalyst.testing import check_arrays, parameter_space, CatalystTestCase
  from catalyst.testing.predicates import assert_equal
  from catalyst.utils.compat import unicode
label_desc: Use image node_id 2 for calling the LabelArrayTestCase obj's underlying member method code with example usage: obj.test_fail_on_direct_construction() without return types