class_docstr: Cast Array as a scalar
class_docstr_tok: ["Cast","Array","as","a","scalar"]
code: def _layered_get_value(self) -> float:
      out = super()._layered_get_value()  # pulls from previous layer
      if not isinstance(out, np.ndarray) or not out.size == 1:
          raise errors.NevergradRuntimeError(
              "Scalar casting can only be applied to size=1 Data parameters"
          )
      integer = np.issubdtype(out.dtype, np.integer)
      out = (int if integer else float)(out[0])
      return out
  
imports: import uuid
  import copy
  import bisect
  from enum import Enum
  import numpy
  from nevergrad.common import errors
  import nevergrad.common.typing
label_desc: Use image node_id 1 for calling the _ScalarCasting obj's underlying member method code with example usage: obj._layered_get_value() and returns: out