TypeError:将积分以外的术语乘以积分函数时出错

时间:2019-03-10 03:01:26

标签: python types integration

我下面有这个Python代码,它给了我错误

* @param {function(Array.<ElementFinder>)} fn
* @param {function(Error)} errorFn
*
* @returns {!webdriver.promise.Promise} A promise which will resolve to
*     an array of ElementFinders represented by the ElementArrayFinder.
*/
then<T>(
    fn?: (value: ElementFinder[] | any[]) => T | wdpromise.IThenable<T>,
    errorFn?: (error: any) => any): wdpromise.Promise<T> {
      if (this.actionResults_) {
      return this.actionResults_.then(fn, errorFn);
} else {
  return this.asElementFinders_().then(fn, errorFn);
}
}

我尝试了不同的解决方法,但我只是想不出问题所在。

@param {function(Array.<ElementFinder>)} fn
* @param {function(Error)} errorFn
*
* @returns {!webdriver.promise.Promise} A promise which will resolve to
*     an array of ElementFinders represented by the ElementArrayFinder.
*/
then<T>(fn?: (value: ElementFinder[] | any[]) => T | wdpromise.IThenable<T>, 
errorFn?: (error: any) => any): wdpromise.Promise<T>;

数据

Q, err =((4*n_f*k_avg*l_f)/(visc_f*mat.tan(alpha)))*quad(integrand, r_w, h_f)

can't multiply sequence by non-int of type 'float'.

计算常量

import math as mat
import scipy.special as sp
from scipy.integrate import quad

执行集成

k_h     = 0.001     
k_v     = 0.0002   
visc_f  = 0.5       
B_o     = 1.25      
r_w     = 9.997    
n_f     = 4         
l_f     = 3048      
h_f     = 914.4     
w       = 0.635     
k_f     = 50        
p_e     = 340.23    
p_w     = 272.18    

0 个答案:

没有答案