docstr: The internal values of a LabelArray should be opaque to numpy ufuncs.
  
  Test that all unfuncs fail.
docstr_tok: ["The","internal","values","of","a","LabelArray","should","be","opaque","to","numpy","ufuncs",".","Test","that","all","unfuncs","fail","."]
code: def test_reject_ufuncs(self):
      """
      The internal values of a LabelArray should be opaque to numpy ufuncs.
  
      Test that all unfuncs fail.
      """
      labels = LabelArray(self.strs, "")
      ints = np.arange(len(labels))
  
      with warnings.catch_warnings():
          # Some ufuncs return NotImplemented, but warn that they will fail
          # in the future.  Both outcomes are fine, so ignore the warnings.
          warnings.filterwarnings(
              "ignore",
              message="unorderable dtypes.*",
              category=DeprecationWarning,
          )
          warnings.filterwarnings(
              "ignore",
              message="elementwise comparison failed.*",
              category=FutureWarning,
          )
          for func in all_ufuncs():
              # Different ufuncs vary between returning NotImplemented and
              # raising a TypeError when provided with unknown dtypes.
              # This is a bit unfortunate, but still better than silently
              # accepting an int array.
              try:
                  if func.nin == 1:
                      ret = func(labels)
                  elif func.nin == 2:
                      ret = func(labels, ints)
                  else:
                      self.fail("Who added a ternary ufunc !?!")
              except (TypeError, ValueError):
                  pass
              else:
                  self.assertIs(ret, NotImplemented)
  
imports: from itertools import product
  from operator import eq, ne
  import warnings
  import numpy
  from toolz import take
  from zipline.lib.labelarray import LabelArray
  from zipline.testing import check_arrays, parameter_space, ZiplineTestCase
  from zipline.testing.predicates import assert_equal
  from zipline.utils.compat import unicode
label_desc: Use image node_id 11 for calling the LabelArrayTestCase obj's underlying member method code with example usage: obj.test_reject_ufuncs() without return types