Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.measure
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.measure
Commits
aedd0cf4
Commit
aedd0cf4
authored
3 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
[_library.py] implement array_jit decorator correctly
Fixes
#64
parent
a7c665ec
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!104
[_library.py] implement array_jit decorator correctly
Pipeline
#52314
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/measure/_library.py
+2
-0
2 additions, 0 deletions
bob/measure/_library.py
with
2 additions
and
0 deletions
bob/measure/_library.py
+
2
−
0
View file @
aedd0cf4
...
@@ -10,6 +10,7 @@ import numpy
...
@@ -10,6 +10,7 @@ import numpy
import
numpy.linalg
import
numpy.linalg
from
numba
import
jit
,
objmode
from
numba
import
jit
,
objmode
import
logging
import
logging
from
functools
import
wraps
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
@@ -26,6 +27,7 @@ def _lists_to_arrays(*args, **kwargs):
...
@@ -26,6 +27,7 @@ def _lists_to_arrays(*args, **kwargs):
def
array_jit
(
func
):
def
array_jit
(
func
):
jit_func
=
jit
(
func
,
nopython
=
True
)
jit_func
=
jit
(
func
,
nopython
=
True
)
@wraps
(
jit_func
)
def
new_func
(
*
args
,
**
kwargs
):
def
new_func
(
*
args
,
**
kwargs
):
args
,
kwargs
=
_lists_to_arrays
(
*
args
,
**
kwargs
)
args
,
kwargs
=
_lists_to_arrays
(
*
args
,
**
kwargs
)
return
jit_func
(
*
args
,
**
kwargs
)
return
jit_func
(
*
args
,
**
kwargs
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment