Skip to content

Suggestion: Use numpy.zeros() instead of scipy.zeros() for initializing boolean arrays #28

@SaFE-APIOpt

Description

@SaFE-APIOpt

self._processed = scipy.zeros((self._n, 1), dtype=bool)

In this line:
self._processed = scipy.zeros((self._n, 1), dtype=bool)
it's recommended to use numpy.zeros() directly:
self._processed = numpy.zeros((self._n, 1), dtype=bool)
scipy.zeros() is just a thin wrapper around numpy.zeros() and introduces unnecessary overhead. For performance, readability, and consistency, it's best to use numpy.zeros() directly, which is the standard and widely adopted practice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions