Skip to content

[BUG] transform/convert dead ends: np.ndarray, Series→Panel, JSON save-only, duplicate-timestamp ordering #537

Description

@Shashankss1205

Severity: P2 — dead ends and leaked internals in the transform/convert paths. From the 2026-07-26 and 2026-08-08 sweeps.

BUG-21 — np.ndarray handles are a dead end that leaks internal errors

After transform_data(action='convert', to_mtype='np.ndarray'):

  • transform_data(action='format')'numpy.ndarray' object has no attribute 'index'
  • split_data(...) → same AttributeError
  • inspect_datahead: {}, dtypes: {}, summary_stats: {}, fabricated cutoff: "119", no warning

Fix: reject np.ndarray as a pipeline mtype, or give a domain message ("np.ndarray has no time index; convert to pd.Series first").

NB-09 — Series→Panel conversion dumps sktime's raw mtype-inference error

transform_data(data_handle=<Series>, action="convert", to_mtype="pd-multiindex")
  -> multi-paragraph TypeError: "No valid mtype could be identified ... [df-list: ...] [numpy3D: ...] ..."

Garbage mtypes ARE handled cleanly (to_mtype="np.banana" → "not a supported mtype"); scitype-incompatible ones are not.
Fix: scitype check before conversion — "pd-multiindex is a Panel mtype; a Series handle cannot convert to it".

NB-10 — JSON is save-only, and the error hint is a dead end

save_data(format="json")           -> success
load_data_source(...json...)       -> "Could not detect format from extension '.json'. Specify 'format'."
  then with "format":"json"        -> "Unsupported format: json. Supported: csv, excel, parquet"

Fix: add a json loader, or make the extension error stop suggesting a format the loader rejects.

BUG-19 — duplicate timestamps are hard-rejected before auto-format can fix them

load_data_source on a CSV with duplicate timestamps → "Duplicate time indices found: 2 duplicates", no handle returned. The documented remedy (transform_data(action='format', remove_duplicates=True)) is unreachable because validation runs before the auto-format that would fix it.
Fix: auto-format before validation, or downgrade duplicates to a warning.

(Catalogued as BUG-21 / NB-09 / NB-10 / BUG-19 in MCP_TEST_FINDINGS.md.)

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