code: public static byte getDataTypeAsByte(@NonNull org.nd4j.linalg.api.buffer.DataType type) {
          switch (type) {
              case FLOAT:
                  return DataType.FLOAT;
              case DOUBLE:
                  return DataType.DOUBLE;
              case HALF:
                  return DataType.HALF;
              case INT:
                  return DataType.INT32;
              case LONG:
                  return DataType.INT64;
              case BOOL:
                  return DataType.BOOL;
              case SHORT:
                  return DataType.INT16;
              case BYTE:
                  return DataType.INT8;
              case UBYTE:
                  return DataType.UINT8;
              case UTF8:
                  return DataType.UTF8;
              default:
                  throw new ND4JIllegalStateException("Unknown or unsupported DataType used: [" + type + "]");
          }
      }
docs: This method converts enums for DataType
  
  @param type
  @return