class_docstr: Turn a transformed real-valued array into a hash
class_docstr_tok: ["Turn","a","transformed","real-valued","array","into","a","hash"]
code: def _to_hash(projected):
      if projected.shape[1] % 8 != 0:
          raise ValueError(
              "Require reduced dimensionality to be a multiple "
              "of 8 for hashing"
          )
      # XXX: perhaps non-copying operation better
      out = np.packbits((projected > 0).astype(int)).view(
          dtype=HASH_DTYPE
      )
      return out.reshape(projected.shape[0], -1)
  
imports: import numpy
  import warnings
  from scipy import sparse
  from .base import KNeighborsMixin, RadiusNeighborsMixin
  from ..base import BaseEstimator
  from ..utils.validation import check_array
  from ..utils import check_random_state
  from ..metrics.pairwise import pairwise_distances
  from ..random_projection import GaussianRandomProjection
label_desc: Use image node_id 1 for calling the ProjectionToHashMixin obj's underlying member method code with example usage: obj._to_hash(projected) and returns: out