forked from microsoft/onnxruntime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds support for Uint8ClampedArray (microsoft#21985)
Fixes microsoft#21753
- Loading branch information
Showing
4 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
import * as ort from 'onnxruntime-common'; | ||
|
||
// construct from Uint8Array | ||
// | ||
// {type-tests}|pass | ||
new ort.Tensor(new Uint8Array(1)); | ||
|
||
// construct from Uint8ClampedArray | ||
// | ||
// {type-tests}|pass | ||
new ort.Tensor(new Uint8ClampedArray(1)); | ||
|
||
// construct from type (bool), data (Uint8ClampedArray) and shape (number array) | ||
// | ||
// {type-tests}|fail|1|2769 | ||
new ort.Tensor('bool', new Uint8ClampedArray([255, 256]), [2]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters