fromDTypeJson function

DType? fromDTypeJson(
  1. String? json
)

Restores the original DType value by given encoded string

Implementation

DType? fromDTypeJson(String? json) {
  switch (json) {
    case dTypeFloat32EncodedValue:
      return DType.float32;

    case dTypeFloat64EncodedValue:
      return DType.float64;

    default:
      return null;
  }
}