Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when using pi.py #45

Closed
codesssss opened this issue Apr 2, 2022 · 2 comments
Closed

Problem when using pi.py #45

codesssss opened this issue Apr 2, 2022 · 2 comments

Comments

@codesssss
Copy link

I'm trying to use pi() to get the VMAX. According to the comments the arguments P, TC, and R should all be one-dimensional arrays,
But utilities.t_ctok (TC) ,R * 0.001 makes TC, R look like int. I don't know how to use pi (). Can you give me an example data of P,TC,R?
Thanks a lot!

@aramirezreyes
Copy link

You can use the script run_sample.py as an example.
On the other hand. With numpy arrays operations like R*0.001 will perform the operation on every element if R is a numpy array. Take a look at:

In [1]: import numpy as np

In [2]: a = np.array(range(1,10))

In [3]: a
Out[3]: array([1, 2, 3, 4, 5, 6, 7, 8, 9])

In [4]: a * 1000
Out[4]: array([1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000])

In [5]: a + 10
Out[5]: array([11, 12, 13, 14, 15, 16, 17, 18, 19])

So no, they are not ints.

@codesssss
Copy link
Author

Thanks a lot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants