# sympy

##### 复数：将 SymPy 转换为数字（I 到 1j）(Complex numbers: convert SymPy to numeric (I to 1j))

2021-09-25 18:23:21    分类:技术分享    python   complex-numbers   sympy

##### On import modules and method names in python

Suppose I import the following two modules as follows: from sympy import * from numpy import * both modules have an exp() function defined. How does python pick which one to use? Is there a way to distinguish these functions after the modules have been imported as above? What mechanism exists to warn the user when this is the case? Consider the following set of commands in IDLE =============================== RESTART: Shell =============================== >>> from sympy import * >>> from numpy import * >>> exp(5) 148.4131591025766 >>> c = symbols('c') >>> exp(c) Traceback (most recent call

2021-09-25 15:39:19    分类:问答    python   numpy   sympy

##### Complex numbers: convert SymPy to numeric (I to 1j)

using symbolic calculation in Python I have import sympy from cmath import * from mpmath import arg, cplot z = sympy.symbols('z') fhandle='z**2' g = lambda w: sympy.sympify(fhandle).evalf(subs={z: w}) g(1+2j) # Returns: -3.0 + 4.0*I # hence the next command fails, because I is expected to be 1j cplot(g, [-3,3], [-3,3]) Crawling the web I only found this which will fix the matter for the print command, but will not work with cplot. Any suggestions?

2021-09-25 00:09:02    分类:问答    python   complex-numbers   sympy

##### Python3 - Sympy：展开三角函数的乘积(Python3 - Sympy: expand products of trig functions)

2021-09-21 20:46:46    分类:技术分享    python   sympy

##### cosd 和 sind 同情(cosd and sind with sympy)

2021-09-21 19:42:18    分类:技术分享    python   numpy   sympy

##### Julia 在循环中更改名称，使用符号变量(Julia changing name in loop, using symbolic variables)

2021-09-20 16:34:02    分类:技术分享    python   sympy   isinstance