Skip to content

Numpy.random implementations #141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1061071
Add first random_sample implementation
reazulhoque Dec 22, 2020
0e89907
Merge main
reazulhoque Jan 6, 2021
d381eae
add test for radom_sample
reazulhoque Jan 6, 2021
309ab20
Added more functions
reazulhoque Jan 7, 2021
fdc0b65
Added more functions
reazulhoque Jan 7, 2021
9ab7cf3
add random.beta
reazulhoque Jan 7, 2021
99f3d1e
Added more functions
reazulhoque Jan 8, 2021
f562405
Added multinomial
reazulhoque Jan 8, 2021
d0c6296
Added new functions
reazulhoque Jan 8, 2021
82157fb
Added more functions
reazulhoque Jan 8, 2021
a5887d6
Added more functions
reazulhoque Jan 11, 2021
fddac82
Refactor code
reazulhoque Jan 11, 2021
5add359
Merge branch 'main' into feature/numpy_random
reazulhoque Jan 13, 2021
166d04d
Add tests
akharche Jan 24, 2021
bc17ed8
Merge branch 'main' into feature/numpy_random
PokhodenkoSA Jan 26, 2021
eb75510
fix black
PokhodenkoSA Jan 26, 2021
f85d5fb
Move import captured_stdout to the top of the file
PokhodenkoSA Jan 26, 2021
479d7ba
Rename function with test_ to check_
PokhodenkoSA Jan 26, 2021
be6b44c
Make debug messages consistent
PokhodenkoSA Jan 26, 2021
31ab7ae
Consistent name print_debug
PokhodenkoSA Jan 26, 2021
ef3d020
Use assert_dpnp_implementaion() context for tests
PokhodenkoSA Jan 27, 2021
447f30f
Remove unused imports in test_dpnp_functions.py
PokhodenkoSA Jan 27, 2021
39dc6eb
Move checks outside of context
PokhodenkoSA Jan 28, 2021
076b012
Move jittable functions creation outside of overloads
PokhodenkoSA Jan 28, 2021
922b4ac
Merge branch 'main' into feature/numpy_random
PokhodenkoSA Jan 28, 2021
f0bcd05
Update dpnp=0.4.0=*_155
PokhodenkoSA Jan 28, 2021
99ce595
Merge branch 'main' into feature/numpy_random
PokhodenkoSA Jan 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions numba_dppy/dpnp_glue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ def ensure_dpnp(name):
from . import dpnp_fptr_interface as dpnp_glue
except ImportError:
raise ImportError("dpNP is needed to call np.%s" % name)


DEBUG = None
46 changes: 45 additions & 1 deletion numba_dppy/dpnp_glue/dpnp_fptr_interface.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,52 @@ cdef DPNPFuncName get_DPNPFuncName_from_str(name):
return DPNPFuncName.DPNP_FN_COV
elif name == "dpnp_eig":
return DPNPFuncName.DPNP_FN_EIG
elif name == "dpnp_random_sample":
return DPNPFuncName.DPNP_FN_RNG_UNIFORM
elif name == "dpnp_beta":
return DPNPFuncName.DPNP_FN_RNG_BETA
elif name == "dpnp_binomial":
return DPNPFuncName.DPNP_FN_RNG_BINOMIAL
elif name == "dpnp_chisquare":
return DPNPFuncName.DPNP_FN_RNG_CHISQUARE
elif name == "dpnp_exponential":
return DPNPFuncName.DPNP_FN_RNG_EXPONENTIAL
elif name == "dpnp_gamma":
return DPNPFuncName.DPNP_FN_RNG_GAMMA
elif name == "dpnp_geometric":
return DPNPFuncName.DPNP_FN_RNG_GEOMETRIC
elif name == "dpnp_gumbel":
return DPNPFuncName.DPNP_FN_RNG_GUMBEL
elif name == "dpnp_hypergeometric":
return DPNPFuncName.DPNP_FN_RNG_HYPERGEOMETRIC
elif name == "dpnp_laplace":
return DPNPFuncName.DPNP_FN_RNG_LAPLACE
elif name == "dpnp_lognormal":
return DPNPFuncName.DPNP_FN_RNG_LOGNORMAL
elif name == "dpnp_multinomial":
return DPNPFuncName.DPNP_FN_RNG_MULTINOMIAL
elif name == "dpnp_multivariate_normal":
return DPNPFuncName.DPNP_FN_RNG_MULTIVARIATE_NORMAL
elif name == "dpnp_negative_binomial":
return DPNPFuncName.DPNP_FN_RNG_NEGATIVE_BINOMIAL
elif name == "dpnp_normal":
return DPNPFuncName.DPNP_FN_RNG_NORMAL
elif name == "dpnp_poisson":
return DPNPFuncName.DPNP_FN_RNG_POISSON
elif name == "dpnp_rayleigh":
return DPNPFuncName.DPNP_FN_RNG_RAYLEIGH
elif name == "dpnp_standard_cauchy":
return DPNPFuncName.DPNP_FN_RNG_STANDARD_CAUCHY
elif name == "dpnp_standard_exponential":
return DPNPFuncName.DPNP_FN_RNG_STANDARD_EXPONENTIAL
elif name == "dpnp_standard_gamma":
return DPNPFuncName.DPNP_FN_RNG_STANDARD_GAMMA
elif name == "dpnp_uniform":
return DPNPFuncName.DPNP_FN_RNG_UNIFORM
elif name == "dpnp_weibull":
return DPNPFuncName.DPNP_FN_RNG_WEIBULL
else:
return DPNPFuncName.DPNP_FN_DOT
raise ValueError("Unknown dpnp function requested: " + name.split("_")[1])


cdef DPNPFuncType get_DPNPFuncType_from_str(name):
Expand Down
Loading