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

ND refactoring of adjust_for_anisotropy #33

Merged
merged 4 commits into from Jan 27, 2017

Conversation

rth
Copy link
Contributor

@rth rth commented Jan 8, 2017

This PR merges adjust_for_anisotropy and adjust_for_anisotropy_3d into a single ND function, following the discussion in issue #31 regarding refactoring of PyKrige.

Reviews would be appreciated.

@rth rth mentioned this pull request Jan 8, 2017
9 tasks
@rth rth added this to the v1.4 milestone Jan 8, 2017
@basaks
Copy link
Collaborator

basaks commented Jan 14, 2017

@rth
I have gone through this PR. It looks good.

Just one minor comment on your docstring:

Instead of this:

Parameters
    ----------
    X : float array [n_samples, n_dim]
       the input array of coordinates
    center : float array [n_dim]
       the coordinate of centers
    scaling : float array [n_dim - 1]
       the scaling of last two dimensions
    angle : float array [2*n_dim - 3]
       the anysotropy angle (degrees),

if you write it like this:

    Parameters
    ----------
    X: ndarray
        float array [n_samples, n_dim], the input array of coordinates
    center: ndarray
        float array [n_dim], the coordinate of centers
    scaling: ndarray
        float array [n_dim - 1], the scaling of last two dimensions
    angle : ndarray
        float array [2*n_dim - 3], the anysotropy angle (degrees)

    Returns
    -------
    X_adj : ndarray 
        float array [n_samples, n_dim], the X array adjusted for anisotropy,

modern python ides can provide better preview of the args.

@rth
Copy link
Contributor Author

rth commented Jan 14, 2017

Thanks for the review @basaks . I changed the docs following your comments.

@rth rth merged commit 9b1af38 into GeoStat-Framework:master Jan 27, 2017
@rth rth deleted the refactoring-1 branch January 27, 2017 13:35
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.

None yet

2 participants