Return a copied flat java array of current array (row-major). The Tensor dtype must be int8 @return A copy of array content.
()
| 307 | * @return A copy of array content. |
| 308 | */ |
| 309 | public byte[] asByteArray() { |
| 310 | if (dtype.typeCode != TVMType.INT || dtype.bits != 8) { |
| 311 | throw new IllegalArgumentException( |
| 312 | "Cannot set convert to byte[] for " + dtype.toString() + " array"); |
| 313 | } |
| 314 | return internal(); |
| 315 | } |
| 316 | |
| 317 | /** |
| 318 | * Return a copied internal byte array of current array (row-major). |