File: np_c_function.py

package info (click to toggle)
python-pyinstrument 5.1.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,624 kB
  • sloc: python: 6,713; ansic: 897; makefile: 46; sh: 26; javascript: 18
file content (15 lines) | stat: -rw-r--r-- 308 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import sys

import numpy as np

arr = np.random.randint(0, 10000, 10000)

# def print_profiler(frame, event, arg):
#     print(event, arg, getattr(arg, '__qualname__', arg.__name__), arg.__module__, dir(arg))

# sys.setprofile(print_profiler)

for i in range(10000):
    arr.cumsum()

# sys.setprofile(None)