[Python] Python Sklearn.Model_Selection giving error numpy.dtype size changed

Discussão em 'Python' iniciado por Stack, Abril 23, 2025.

  1. Stack

    Stack Membro Participativo

    I have a train test split code

    from sklearn.model_selection import train_test_split

    train_df, test_df = train_test_split(new_cleaned_df, test_size=0.05, random_state=42, shuffle=True)
    train_df.reset_index(drop=True, inplace=True)
    test_df.reset_index(drop=True, inplace=True)

    print(train_df.shape)
    print(test_df.shape)


    What causes an error when importing Sklearn.Model_Selection, even though numpy-1.24.4 and scikit-learn-1.2.2 have been installed?

    ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

    Continue reading...

Compartilhe esta Página