src/orion/core/worker/transformer.py
def transform(self, point):
        """Round `point` to the requested precision, as numpy arrays."""
        # numpy.format_float_scientific precision starts at 0
        if isinstance(point, (list, tuple)) or (
            isinstance(point, numpy.ndarray) and point.shape
        ):
            format_float = numpy.vectorize(
                lambda x: numpy.format_float_scientific(x, precision=self.precision - 1)
            )
            point = format_float(point)
            to_float = numpy.vectorize(float)
            point = to_float(point)
        else:
            point = float(
                numpy.format_float_scientific(point, precision=self.precision - 1)
            )

        return numpy.asarray(point)
Round `point` to the requested precision, as numpy arrays.
Round `point` to the requested precision, as numpy arrays.
Round ` point ` to the requested precision as numpy arrays .
def transform(self, point):
        if isinstance(point, (list, tuple)) or (
            isinstance(point, numpy.ndarray) and point.shape
        ):
            format_float = numpy.vectorize(
                lambda x: numpy.format_float_scientific(x, precision=self.precision - 1)
            )
            point = format_float(point)
            to_float = numpy.vectorize(float)
            point = to_float(point)
        else:
            point = float(
                numpy.format_float_scientific(point, precision=self.precision - 1)
            )
        return numpy.asarray(point)
def transform ( self , point ) : if isinstance ( point , ( list , tuple ) ) or ( isinstance ( point , numpy . ndarray ) and point . shape ) : format_float = numpy . vectorize ( lambda x : numpy . format_float_scientific ( x , precision = self . precision - 1 ) ) point = format_float ( point ) to_float = numpy . vectorize ( float ) point = to_float ( point ) else : point = float ( numpy . format_float_scientific ( point , precision = self . precision - 1 ) ) return numpy . asarray ( point )
Round `point` to the requested precision, as numpy arrays.
Round ` point ` to the requested precision as numpy arrays .
"""Round `point` to the requested precision, as numpy arrays.""" # numpy.format_float_scientific precision starts at 0
self
point