Skip to main content

Perform checks over numba usage

Project description

flake8-numba

Improve your Python development experience with flake8-numba. This plugin integrates with Flake8 to provide comprehensive code analysis for projects that make use of numba. When working with numba, many errors are not discovered until the code is run. However, many of these issues can be perfectly caught by performing some basic syntactical analysis. This tool helps you catch potential errors and enhance code quality effortlessly.

Installation

Make sure that you have flake8 installed. Then:

pip install flake8-numba

After it calling flake8 will include all rules defined by this plugin.

Rules

Some examples are:

@vectorize([float64(float64, float64)])
def f(x, y):
    return x + y, 2  # ERROR: only 1 value can be returned

or:

# ERROR: Dimensions mismatch (second argument at left is an array but an scalar at right)
@guvectorize([(float32, float32[:], float32)], "(), () -> ()")
def func(...) -> None:
    ...

All available rules can be read in RULES.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8_numba-0.4.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flake8_numba-0.4.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file flake8_numba-0.4.0.tar.gz.

File metadata

  • Download URL: flake8_numba-0.4.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.11 Windows/10

File hashes

Hashes for flake8_numba-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ab3c9fe9a179c4d7664ecf51454dc22fa442ef46b09c5e5e4a4e992b63f73a1c
MD5 1734396d71f1eb6b059bdd65b4b4624f
BLAKE2b-256 29746a6a98c8bb5adaaac2a543eb4650d28dcf69b29a46aa662500fc9bcb7bd8

See more details on using hashes here.

File details

Details for the file flake8_numba-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: flake8_numba-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.11 Windows/10

File hashes

Hashes for flake8_numba-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ca23bef5bbbf1d0d303dca3068ae746ce680e90643c2997002381f43e6f2ad6
MD5 108844e2dbc06af5f7f351a1bc9579ca
BLAKE2b-256 467e892d90f238849e26e63ef480594e47bfa35691893c975b85911bd7c0fe3b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page