Skip to content

Warning message for one function is used by several, and contains extraneous information #5945

Closed
@holdenweb

Description

@holdenweb

In this Stackoverflow question the inquirer points out the following discrepancy in an error message:

In [5]: np.delete(x, x == a)
/usr/lib/python2.7/dist-packages/numpy/lib/function_base.py:3254: FutureWarning: in the future insert will treat boolean arrays and array-likes as boolean index instead of casting it to integer
  "of casting it to integer", FutureWarning)

Since the warning is produced by a call to delete() it would be better if the message didn't refer to a specific function.

Also, why does the string "of casting it to integer" appear at the end of the warning message?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions