Asin#

  • Domain: ai.onnx

  • Since version: 22

Computes the Asin value of the input tensor element-wise.

Inputs

  • input (T): Input tensor

Outputs

  • output (T): The arcsine of the input tensor computed element-wise

Type Constraints

  • T: Constrain input and output types to float tensors. Allowed types: tensor(bfloat16), tensor(double), tensor(float), tensor(float16).

Examples#

test_asin

Node:
  Asin(x) -> (y)
Inputs:
  x: shape=(3, 4, 5), dtype=float32
    [[[0.5665616 , 0.7457818 , 0.97100276, 0.4443592 , 0.4442647 ],
      [0.7628944 , 0.87734866, 0.5230672 , 0.2855087 , 0.79399663],
      [0.40414217, 0.60542035, 0.4549379 , 0.530079  , 0.4359654 ],
      [0.16703498, 0.64533466, 0.8153506 , 0.681705  , 0.88432455]],

     [[0.06596019, 0.08141465, 0.49587995, 0.12310889, 0.28691137],
      [0.04790118, 0.5155199 , 0.7137708 , 0.04374827, 0.9977479 ],
      [0.5978522 , 0.5865951 , 0.39716926, 0.43898672, 0.25327316],
      [0.5297574 , 0.5436708 , 0.74823534, 0.8180335 , 0.66857344]],

     [[0.86182827, 0.70817924, 0.23636054, 0.6562355 , 0.86890894],
      [0.8393313 , 0.32443324, 0.15917933, 0.893939  , 0.91269016],
      [0.30185628, 0.13158494, 0.32568365, 0.9401739 , 0.39366215],
      [0.08773083, 0.60704976, 0.1554775 , 0.9583321 , 0.8756153 ]]]

Outputs:
  y: shape=(3, 4, 5), dtype=float32
    [[[0.6023271 , 0.8417076 , 1.32939   , 0.46045884, 0.46035337],
      [0.86777824, 1.0703087 , 0.55044574, 0.28953716, 0.9173553 ],
      [0.4160408 , 0.65029395, 0.4723025 , 0.55869377, 0.4511107 ],
      [0.16782163, 0.7014613 , 0.95333445, 0.75009054, 1.0850453 ]],

     [[0.06600811, 0.08150487, 0.5188478 , 0.123422  , 0.29100108],
      [0.04791952, 0.5416143 , 0.7948675 , 0.04376224, 1.5036703 ],
      [0.640819  , 0.6268482 , 0.40843034, 0.4544706 , 0.25606224],
      [0.55831444, 0.57480454, 0.8453982 , 0.95798373, 0.7322888 ]],

     [[1.0388633 , 0.786916  , 0.23861854, 0.7158189 , 1.0529938 ],
      [0.996052  , 0.3304125 , 0.15985933, 1.1060584 , 1.1498194 ],
      [0.30663916, 0.13196765, 0.33173472, 1.2231405 , 0.40461203],
      [0.08784376, 0.65234274, 0.15611081, 1.281105  , 1.0667082 ]]]

test_asin_example

Node:
  Asin(x) -> (y)
Inputs:
  x: shape=(3,), dtype=float32
    [-0.5,  0. ,  0.5]

Outputs:
  y: shape=(3,), dtype=float32
    [-0.5235988,  0.       ,  0.5235988]

test_cc_asin

Node:
  Asin(x) -> (y)
Inputs:
  x: shape=(2, 3), dtype=float32
    [[-1.  , -0.5 ,  0.  ],
     [ 0.25,  0.5 ,  1.  ]]

Outputs:
  y: shape=(2, 3), dtype=float32
    [[-1.5707964 , -0.5235988 ,  0.        ],
     [ 0.25268024,  0.5235988 ,  1.5707964 ]]

Differences with previous version (7)#

SchemaDiff: Asin (domain 'ai.onnx')

  • old version: 7

  • new version: 22

  • breaking: no

Type constraints:

  • changed ‘T’: added types: [‘tensor(bfloat16)’]

Version History#