初心者です。場合分けのある関数σv_11(m_x)のグラフを書きたいのですが、
σv_11 = h_11(m_x)
のところで、
NumPy boolean array indexing assignment cannot assign 3000 input values to the 2627 output values where the mask is true
というエラーが発生してしまいます。
どこに原因があるか、教えていただきたいです。よろしくお願い致します。
python
1ε = 0.001 #GeV 2m_x = np.linspace(1,1000,3000) 3m_h = 125 4m_h1 = m_h 5m_h2 = np.sqrt(1 + 2*ε)*m_h1 6λ_hs = 100.00 7λ_s = 100.00 8C_θ = 1/np.sqrt(2) #θ=π/4 9S_θ = np.sqrt(1-(C_θ)**2) 10 11 12def h_11(t): 13 condlist = [t < m_h1, t >= m_h1] 14 funclist = [lambda a: 0, lambda a: 1/128 /np.pi /t**2 *np.sqrt(1- m_h1**2/t**2) *(λ_hs *C_θ**2 + λ_s *S_θ**2)**2 ] 15 return np.piecewise(t, condlist, funclist) 16 17σv_11 = h_11(m_x) 18 19
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/07/25 02:50