python - Element-wise operations in mpmath -


i looking perform element-wise mpmath operations on python arrays. example,

import mpmath mpm x = mpm.arange(0,4) y = mpm.sin(x)        # error 

alternatively, using mpmath matrices

x = mpm.matrix([0,1,2,3]) y = mpm.sin(x)             # error 

does mpmath have capibilities in area, or necessary loop through entries?

mpmath not appear handle elemnt-wise operation, can use numpy functionality:

import numpy np import mpmath mpm x = np.array(mpm.arange(0,4))  sin = np.vectorize(mpm.sin) y = sin(x) 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -