Skip to content

"frac_to_plot" parameter in ice_plot #27

@andrew-cho

Description

@andrew-cho

Hey Austin,

This package rocks, thanks for publishing it!

I have a question and a potential small bug in the ice_plot method, specifically on the "frac_to_plot" parameter.

It is my understanding that you simply take the fraction and multiply by the number of columns, and then pass this to the "size" parameter of np.random.choice(). I think we should make sure that the number being passed is an integer, not a float. Otherwise np.random.choice() will not accept a float as a parameter for "size".

Current:
icols = np.random.choice(n_cols, size=frac_to_plot * n_cols, replace=False)

Fix:
icols = np.random.choice(n_cols, size=int(frac_to_plot * n_cols), replace=False)

Best,
Andrew

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions