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

proposed fix for #229 #232

Closed
wants to merge 3 commits into from
Closed

proposed fix for #229 #232

wants to merge 3 commits into from

Conversation

selipot
Copy link
Member

@selipot selipot commented Aug 12, 2023

fix #229

@selipot selipot added the bug Something isn't working label Aug 12, 2023
@selipot selipot self-assigned this Aug 12, 2023
@selipot
Copy link
Member Author

selipot commented Aug 12, 2023

the tests on the time axis fail which is obviously related to what this PR is intending on fixing. My issue is that I don't fully understand these tests. However, I think that my proposed fix can work, e.g.:

x = np.random.rand(10,20,100)
y = np.random.rand(10,20,100)
t = np.tile(np.arange(0,100),(10,20,1))
u,v = analysis.position_from_velocity(x,y,t,0,0,time_axis=0)
display(np.shape(x))
display(np.shape(u))

(10, 20, 100)
(10, 20, 100)

x = np.random.rand(10,20,100)
y = np.random.rand(10,20,100)
t = np.tile(np.arange(0,100),(10,20,1))
u,v = analysis.position_from_velocity(x,y,t,0,0,time_axis=1)
display(np.shape(x))
display(np.shape(u))

(10, 20, 100)
(10, 20, 100)

x = np.random.rand(10,20,100)
y = np.random.rand(10,20,100)
t = np.tile(np.arange(0,100),(10,20,1))
u,v = analysis.position_from_velocity(x,y,t,0,0,time_axis=-1)
display(np.shape(x))
display(np.shape(u))

(10, 20, 100)
(10, 20, 100)

@selipot
Copy link
Member Author

selipot commented Aug 31, 2023

replaced by #232

@selipot selipot closed this Aug 31, 2023
@selipot selipot deleted the analysis-nd-fix branch August 31, 2023 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

velocity_from_position not behaving as expected
1 participant