Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %%cython -a
- # cython: linetrace=True
- # cython: binding=True
- # distutils: define_macros=CYTHON_TRACE_NOGIL=1
- import numpy as np
- cimport numpy as np
- from datetime import datetime
- import math
- cpdef np.int64_t get_days(np.int64_t year, np.int64_t month):
- cdef np.ndarray months=np.array([31,28,31,30,31,30,31,31,30,31,30,31])
- if month==2:
- if (year%4==0 and year%100!=0) or (year%400==0):
- return 29
- return months[month-1]
- Timer unit: 1e-07 s
- Total time: 0.0033868 s
- File: .ipythoncython_cython_magic_0154a9feed9bbd6e4f23e57d73acf50f.pyx
- Function: loanDates at line 34
- Line # Hits Time Per Hit % Time Line Contents
- ==============================================================
- 34 cpdef np.ndarray[np.int64_t] loanDates(np.int64_t startDate,np.int64_t endDate,np.int64_t freq):
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement