Skip to content

Converting from NumPy array to list in mimic_explainer.py:_save() #566

@GraceBrigham

Description

@GraceBrigham

Problem: When using _save() in mimic_explainer.py to serialize my explainable model I ran into the TypeError "Object of type ndarray is not JSON serializable." My issue was that the classes parameter I used in the constructor was a ndarray and not a list.

Solution: In the future, it might be nice if ndarrays are automatically converted to lists to avoid the serialization error in the future.

Thanks!

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