File Exchange
Try Origin for Free
The Origin Forum
Home
|
Profile
|
Register
|
Active Topics
|
Members
|
Search
|
FAQ
|
Send File to Tech support
All Forums
Origin Forum for Programming
Forum for Python
Python function for Colume value calucation
Note:
Only the poster of this message, and the Moderator can edit the message.
Screensize:
640 x 480
800 x 600
1024 x 768
1280 x 1024
UserName:
Password:
Anti-Spam Code:
Format Mode:
Basic
Help
Prompt
Format:
Font
Andale Mono
Arial
Arial Black
Book Antiqua
Century Gothic
Comic Sans MS
Courier New
Georgia
Impact
Lucida Console
Script MT Bold
Stencil
Tahoma
Times New Roman
Trebuchet MS
Verdana
Size
1
2
3
4
5
6
Color
Black
Red
Yellow
Pink
Green
Orange
Purple
Blue
Beige
Brown
Teal
Navy
Maroon
LimeGreen
Forum:
Forum for Python
Subject:
Message:
* HTML is OFF
*
Forum Code
is ON
Smilies
Need help, I tried to calucate column values using Python function, as decribed below. But I got an error message like, '<' not supported between instances of 'list' and 'int', I could solve this with my Juypter notebook, but no idea how to do debugging. At Set Colume values "Col(E)" = 'py.J(5, 270/col('Temp'), "Python Function" import numpy as np from scipy.integrate import quad def J(n, y): integrand = lambda x: (x**n) / ((np.exp(x) - 1)*(1 - np.exp(-x))) result, _ = quad (integrand, 0, y) return result Error as below >> Traceback (most recent call last): File "C:\Users\zsung\AppData\Local\OriginLab\101\TMP\pyTmp\_SCV.py", line 7, in J result, _ = quad (integrand, 0, y) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\OriginLab\PyPackage\Py311\64bit\scipy\integrate\_quadpack_py.py", line 433, in quad flip, a, b = b < a, min(a, b), max(a, b) ^^^^^ TypeError: '<' not supported between instances of 'list' and 'int'
Check here to subscribe to this topic.
The Origin Forum
© 2020 Originlab Corporation
Snitz Forums 2000