Sunday, April 5, 2026
HomeLanguagesPython – tensorflow.math.ndtri()

Python – tensorflow.math.ndtri()

TensorFlow is open-source python library designed by Google to develop Machine Learning models and deep learning  neural networks. ndtri() is used to find quantile of Standard Normal.

Syntax: tf.math.ndtri(x, name)

Parameter:

  • x: It’s the input tensor. Allowed dtype for this tensor are float or double..
  • name(optional): It defines the name for the operation.

Returns: It returns Inverse error function of x.

Example 1:

Python3




# Importing the library
import tensorflow as tf
 
# Initializing the input tensor
a = tf.constant([.2, .5, .7, 1], dtype = tf.float64)
 
# Printing the input tensor
print('Input: ', a)
 
# Calculating result
res = tf.math.ndtri(x = a)
 
# Printing the result
print('Result: ', res)


Output:

Input:  tf.Tensor([0.2 0.5 0.7 1. ], shape=(4, ), dtype=float64)
Result:  tf.Tensor([-0.84162123  0.          0.52440051         inf], shape=(4, ), dtype=float64)

Example 2:

Python3




# importing the library
import tensorflow as tf
 
# Initializing the input tensor
a = tf.constant([-.1, -.2, -.5, .5, .2, .1], dtype = tf.float64)
 
# Printing the input tensor
print('Input: ', a)
 
# Calculating result
res = tf.math.ndtri(x = a)
 
# Printing the result
print('Result: ', res)


Output:

Input:  tf.Tensor([-0.1 -0.2 -0.5  0.5  0.2  0.1], shape=(6, ), dtype=float64)
Result:  tf.Tensor([       -inf        -inf        -inf  0.         -0.84162123 -1.28155157], shape=(6, ), dtype=float64)
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32512 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6886 POSTS0 COMMENTS
Nicole Veronica
12007 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12100 POSTS0 COMMENTS
Shaida Kate Naidoo
7015 POSTS0 COMMENTS
Ted Musemwa
7259 POSTS0 COMMENTS
Thapelo Manthata
6972 POSTS0 COMMENTS
Umr Jansen
6960 POSTS0 COMMENTS