public transform(notnull data as NDArray<T>, inPlace as Boolean = false) as NDArray<T>
Applies (x - trainingMean) / trainingScale using one fused buffer pass. Inputs and fitted statistics are never retained by the returned tensor. In-place operation validates all values before writing, without allocating a second full-size tensor. Device-backed inputs are synchronized to CPU.
| Parameter | Description |
|---|---|
data | Finite matrix with the fitted feature count and dtype T. |
inPlace | False returns an independent tensor; true modifies data. |
New tensor, or exactly data when inPlace is true.
scaled = scaler.transform(xTest)
assert scaler.transform(xTest, inPlace=true) is xTest