Skip to content

pandas as_matrix deprecation #33

@imanyakin

Description

@imanyakin

Trying to run MCS analysis, but gt complains:

'DataFrame' object has no attribute 'as_matrix'

This appears to have been deprecated since 0.23.0.

  • There are only two instances of as_matrix use in pygcam/mcs/sensitivity.py
  • seems like they can be fixed with relative ease:

'bounds' : data.as_matrix(columns=['low','high']), ->
'bounds' : data[['low','high']].to_numpy(),

self.results = self.resultsDF[resultName].as_matrix() ->
self.results = self.resultsDF[resultName].to_numpy()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions