Saturday, January 17, 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
32474 POSTS0 COMMENTS
Milvus
118 POSTS0 COMMENTS
Nango Kala
6846 POSTS0 COMMENTS
Nicole Veronica
11977 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12063 POSTS0 COMMENTS
Shaida Kate Naidoo
6985 POSTS0 COMMENTS
Ted Musemwa
7219 POSTS0 COMMENTS
Thapelo Manthata
6933 POSTS0 COMMENTS
Umr Jansen
6911 POSTS0 COMMENTS