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

Fix for bug when using InterpND to interpolate on 1D data. #1941

Merged
merged 5 commits into from
Mar 5, 2021

Conversation

Kenneth-T-Moore
Copy link
Member

Summary

Fix for bug when using InterpND to interpolate on 1D data. It now works when you 1-dimensional arrays as any input. Formerly those arrays needed to be 2D.

Related Issues

Backwards incompatibilities

None

New Dependencies

None

Initialize instance of interpolation class.
Initialize an InterpND object.

This object can be setup and used to interpolate on a curve or multi-dimensional table
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing a period


For interpolation, specify values and points.

For spline evaulation, specifiy x_interp and either points or num_cp.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

evaulation

The points defining the regular grid in n dimensions.
For 1D interpolation, this can be an ndarray of table locations.
For table interpolation, it can be a tuple or an ndarray. If it is a tuple, it should
contain one ndarry for each table dimension.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ndarry

@@ -113,8 +126,35 @@ def __init__(self, method="slinear", points=None, values=None, x_interp=None, ex
'%s.' % (method, all_m))
self.extrapolate = extrapolate

# The table points are always defined, either by specifying the number of the points
# directly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence has an 'either' but is it missing an 'or'?

@Kenneth-T-Moore
Copy link
Member Author

All issues fixed.

@swryan swryan merged commit ae5c61a into OpenMDAO:master Mar 5, 2021
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

Successfully merging this pull request may close these issues.

Exception when using Interp1D with a 1D table where the grid is defined with an ndarray.
3 participants