numeric

Implementing Integration Limits when using Numerical Integration

Implementing Integration Limits when using Numerical Integration Question: I’m using numerical integration to model the trajectory of a particle passing through a non-uniform magnetic field. I’m specifically using a Markov Chain Monte Carlo algorithm (Metropolis-Hastings) that allows me to calculate model data in order to fit the actual particle’s data. The issue that I have …

Total answers: 1

Something goes wrong calculating the slope of the simulation

Something goes wrong calculating the slope of the simulation Question: In this python code we are trying to simulate the path of a frisbee that is being shot from a shooter with a certain angle (alpha0). The angle of attack should be the angle at which its being shot, minus the slope of its path. …

Total answers: 1

How to filter Pandas Unique Result by only Non-Numeric Values?

How to filter Pandas Unique Result by only Non-Numeric Values? Question: Context I have a Pandas Series and am calling the .unique() Method to get all unique Values. I now would like to filter this result to only see unique Values that are Non-Numeric. However, I get the following Error: Error: AttributeError: ‘float’ object has …

Total answers: 4

How to do cubic spline interpolation and integration in Pytorch

How to do cubic spline interpolation and integration in Pytorch Question: In Pytorch, is there cubic spline interpolation similar to Scipy’s? Given 1D input tensors x and y, I want to interpolate through those points and evaluate them at xs to obtain ys. Also, I want an integrator function that finds Ys, the integral of …

Total answers: 2

Is it possible to set a number to NaN or infinity?

Is it possible to set a number to NaN or infinity? Question: Is it possible to set an element of an array to NaN in Python? Additionally, is it possible to set a variable to +/- infinity? If so, is there any function to check whether a number is infinity or not? Asked By: Bob …

Total answers: 5