2018-06-28 10:20:49 -0500 | received badge | ● Notable Question (source) |

2015-09-10 15:26:28 -0500 | received badge | ● Popular Question (source) |

2014-06-11 20:46:32 -0500 | received badge | ● Notable Question (source) |

2014-05-29 20:05:31 -0500 | received badge | ● Popular Question (source) |

2013-05-15 18:02:42 -0500 | asked a question | static typing of mpf variables in cython Hello, I am a new user of cython. I was looking for the static typing of python's mpf type variables in cython for speed up. For example: python: N=10 static typing in cython: cdef int N=10 Now I'm looking for the equivalent for mpf variables: python: from mpmath import mpf , N = mpf(10) cython: ??? maybe sth like: 'cdef mpf_t N=10' but this doesn't work. Thank you, |

2013-01-15 11:29:40 -0500 | answered a question | Matrices and mpmath Thanks a lot! |

2013-01-15 11:16:05 -0500 | answered a question | Matrices and mpmath I'm trying to due high precision numerical work so I need to use mpf numbers. When we define matrices in sage using mpmath it seems that it loses the linalg operations such as inversion, so you can't calculate the inverse of a matrix as before. Is there a specific command for it? For example: Sage: M=matrix([[2,0],[0,2]]) Sage: M**-1 [1/2 0] [ 0 1/2] But: Sage: M=mp.matrix([[2,0],[0,2]]) Sage: M**-1 Gives the error: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_27.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# - File "/tmp/tmps6geGH/___code___.py", line 4, in <module> exec compile(u'M**-_sage_const_1 File "", line 1, in <module> File "/sagenb/sage_install/sage-5.4-sage.math.washington.edu-x86_64-Linux/local/lib/python2.7/site-packages/mpmath/matrices/matrices.py", line 603, in __pow__ raise ValueError('only integer exponents are supported') ValueError: only integer exponents are supported It seems that Sage is not very friendly with mpmath. Is there something that should be imported or a specific command to use? Thank you. |

2013-01-15 10:13:17 -0500 | answered a question | Matrices and mpmath Thank you. That works. I have to then alter my code in ipython a bit.. |

2013-01-15 10:11:08 -0500 | received badge | ● Supporter (source) |

2013-01-15 09:08:51 -0500 | asked a question | Matrices and mpmath Hello, I'm trying to work with matrices. I type Since I need this command ( Any help would be appreciated. Thank you. |

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.