funclp.Polynomial5 module

class funclp.Polynomial5(**kwargs)[source]

Bases: Function

property a
static a0(res, *args)
a_fit = True
a_max = np.float32(inf)
a_min = np.float32(-inf)
property b
static b0(res, *args)
b_fit = True
b_max = np.float32(inf)
b_min = np.float32(-inf)
property c
static c0(res, *args)
c_fit = True
c_max = np.float32(inf)
c_min = np.float32(-inf)
property constants
property cpu_d_a
property cpu_d_b
property cpu_d_c
property cpu_d_d
property cpu_d_e
property cpu_d_f
property cpu_function
property cpukernel_d_a
property cpukernel_d_b
property cpukernel_d_c
property cpukernel_d_d
property cpukernel_d_e
property cpukernel_d_f
property cpukernel_function
property d
static d0(res, *args)
d_a

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_b

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_c

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_d

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_e

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_f

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

d_fit = True
d_max = np.float32(inf)
d_min = np.float32(-inf)
data = []
property e
static e0(res, *args)
e_fit = True
e_max = np.float32(inf)
e_min = np.float32(-inf)
property f
static f0(res, *args)
f_fit = True
f_max = np.float32(inf)
f_min = np.float32(-inf)
function

Decorator class defining universal function factory object from python kernel function, will create kernels, vectorized functions, jitted functions, stack functions, all on CPU / Parallel CPU / GPU.

Examples

>>> from funclp import Parameter, ufunc
>>> import numpy as np
...
>>> class MyClass() :
...     @ufunc(variables=['x', 'y'], data=['constant'], parameters=[Parameter('a', 1), Parameter('b', 0)])
...     def myfunc(x, y, constant, /, a, b) :
...         return a * x + b * y + constant
...     cuda = False
...
>>> instance = MyClass()
...
>>> x = np.arange(20).reshape((1, 20)) # Example of variables that can be broadcasted together
>>> y = np.arange(20).reshape((20, 1)) # Example of variables that can be broadcasted together
>>> constant = np.ones((5, 20, 20)) # Example of data with full shape
>>> a = np.arange(5) # Example of parameter vector
>>> b = 0.5 # Example of scalar use
>>> cpu_out = instance.myfunc(x, y, constant, a=a, b=b)
>>> instance.cuda = True
>>> gpu_out = instance.myfunc(x, y, constant, a=a, b=b)

property gpu_d_a
property gpu_d_b
property gpu_d_c
property gpu_d_d
property gpu_d_e
property gpu_d_f
property gpu_function
property gpukernel_d_a
property gpukernel_d_b
property gpukernel_d_c
property gpukernel_d_d
property gpukernel_d_e
property gpukernel_d_f
property gpukernel_function
property parameters
python_d_a(a, b, c, d, e, f)
python_d_b(a, b, c, d, e, f)
python_d_c(a, b, c, d, e, f)
python_d_d(a, b, c, d, e, f)
python_d_e(a, b, c, d, e, f)
python_d_f(a, b, c, d, e, f)
python_function(a=1.0, b=0.0, c=0.0, d=0.0, e=0.0, f=0.0)
property roots
variables = ['x']