mirror of
https://github.com/clearlinux/graphene.git
synced 2026-06-29 01:15:54 +00:00
1d25612006
Pylint output was filtered so that many files with existing pylint violations were allowed to stay broken. I made sure all files pass pylint, but whitelisted some rules that we commonly disable: * missing docstrings: most of the code is tests/internal anyway * invalid-name: too many violations, and we commonly use one- or two-character names (like "a, b" or "t1, t2") which is disallowed by this rule; we could tweak it and then fix remaining violations such as camel-case or lowercase constants * fixme: we leave TODOs as a matter of practice, same as in C * high-level style rules like too-few-* and too-many-*, no-self-use Hopefully that will make using pylint less annoying, while also catching serious issues (such as unused variables or imports).
21 lines
387 B
Python
21 lines
387 B
Python
#!/usr/bin/env python3
|
|
|
|
import timeit
|
|
|
|
import numpy
|
|
|
|
try:
|
|
import numpy.core._dotblas
|
|
except ImportError:
|
|
pass
|
|
|
|
print("numpy version: " + numpy.__version__)
|
|
|
|
x = numpy.random.random((1000, 1000))
|
|
|
|
setup = "import numpy; x = numpy.random.random((1000, 1000))"
|
|
count = 5
|
|
|
|
t = timeit.Timer("numpy.dot(x, x.T)", setup=setup)
|
|
print("numpy.dot: " + str(t.timeit(count)/count) + " sec")
|