Monday, October 6, 2025
HomeLanguagesEvaluate a 3D Laguerre series at points (x,y,z) with 4D array of...

Evaluate a 3D Laguerre series at points (x,y,z) with 4D array of coefficient using NumPy in Python

In this article, we will evaluate a 3D Laguerre Series at points (x,y) with 4 dimensional array of coefficient in Python.

laguerre.lagval3d()

The laguerre.lagval3d() is used to evaluate a 3D Laguerre series at points (x,y)  which returns the values of the multidimensional polynomial on points formed with triples of corresponding values from x, y, and z values, So we have to provide three lists such that each list has an x-point and y-point.

Syntax: laguerre.lagval3d(points,coefficient_array)

Parameters:

  • Points(x,y): The first parameter can be a list of points – x and y.
  • c: It is an numpy array of coefficients ordered such that it is of 3 Dimensions.

Return: multidimensional polynomial on points

Example 1:

In this example, we are creating numpy array with coefficients from 0 to 47 with (2*6) each and evaluate Laguerre Series at points [3,4],[1,2],[6,7].

Python3




# import numpy module
import numpy 
# import laguerre
from numpy.polynomial import laguerre
  
# Create 1d array of 6 elements
coefficient_array = numpy.arange(48).reshape(2,2,6,2)
  
# Display 
print(coefficient_array)
  
# display the Dimensions
print(coefficient_array.ndim)
  
# display Shape
print(coefficient_array.shape)
  
# Evaluate a 3D Laguerre series at 
# points (x,y) - [3,4],[1,2],[6,7]
print(laguerre.lagval3d([3,4],[1,2],[6,7],coefficient_array))


Output:

Evaluate a 3D Laguerre series at points (x,y,z) with 4D array of coefficient in Python

 

Example 2:

In this example we are creating NumPy array with coefficients from 0 to 47 with (2*6) each and evaluate Laguerre Series at points [0,0],[0,0] and [0,0].

Python3




# import numpy module
import numpy 
# import laguerre
from numpy.polynomial import laguerre
  
# Create 1d array of 6 elements
coefficient_array = numpy.arange(48).reshape(2,2,6,2)
  
# Display 
print(coefficient_array)
  
# display the Dimensions
print(coefficient_array.ndim)
  
  
# display Shape
print(coefficient_array.shape)
  
# Evaluate a 3D Laguerre series at points
# (x,y) - [0,0],[0,0],[0,0]
print(laguerre.lagval3d([0,0],[0,0],[0,0],coefficient_array))


Output:

Evaluate a 3D Laguerre series at points (x,y,z) with 4D array of coefficient in Python

 

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32337 POSTS0 COMMENTS
Milvus
86 POSTS0 COMMENTS
Nango Kala
6707 POSTS0 COMMENTS
Nicole Veronica
11871 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11936 POSTS0 COMMENTS
Shaida Kate Naidoo
6823 POSTS0 COMMENTS
Ted Musemwa
7089 POSTS0 COMMENTS
Thapelo Manthata
6779 POSTS0 COMMENTS
Umr Jansen
6779 POSTS0 COMMENTS