diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2018-02-13 16:36:26 +0000 |
---|---|---|
committer | Edoardo Pasca <edo.paskino@gmail.com> | 2018-02-20 16:18:46 +0000 |
commit | 09efb291c7edc57cff7300d16adc627fce13bcc7 (patch) | |
tree | e48252598d768d1852659a4f124f7f91f0f353f8 /Wrappers/Python/src | |
parent | d57b398a39d64e2ed8ab7bbc65be5e04f013d5ea (diff) | |
download | regularization-09efb291c7edc57cff7300d16adc627fce13bcc7.tar.gz regularization-09efb291c7edc57cff7300d16adc627fce13bcc7.tar.bz2 regularization-09efb291c7edc57cff7300d16adc627fce13bcc7.tar.xz regularization-09efb291c7edc57cff7300d16adc627fce13bcc7.zip |
removed and renamed a few things
Diffstat (limited to 'Wrappers/Python/src')
-rw-r--r-- | Wrappers/Python/src/cpu_regularizers.cpp (renamed from Wrappers/Python/src/fista_module.cpp) | 0 | ||||
-rw-r--r-- | Wrappers/Python/src/multiply.pyx | 49 |
2 files changed, 0 insertions, 49 deletions
diff --git a/Wrappers/Python/src/fista_module.cpp b/Wrappers/Python/src/cpu_regularizers.cpp index e311570..e311570 100644 --- a/Wrappers/Python/src/fista_module.cpp +++ b/Wrappers/Python/src/cpu_regularizers.cpp diff --git a/Wrappers/Python/src/multiply.pyx b/Wrappers/Python/src/multiply.pyx deleted file mode 100644 index 65df1c6..0000000 --- a/Wrappers/Python/src/multiply.pyx +++ /dev/null @@ -1,49 +0,0 @@ -""" -multiply.pyx - -simple cython test of accessing a numpy array's data - -the C function: c_multiply multiplies all the values in a 2-d array by a scalar, in place. - -""" - -import cython - -# import both numpy and the Cython declarations for numpy -import numpy as np -cimport numpy as np - -# declare the interface to the C code -cdef extern void c_multiply (double* array, double value, int m, int n) - -@cython.boundscheck(False) -@cython.wraparound(False) -def multiply(np.ndarray[double, ndim=2, mode="c"] input not None, double value): - """ - multiply (arr, value) - - Takes a numpy arry as input, and multiplies each elemetn by value, in place - - param: array -- a 2-d numpy array of np.float64 - param: value -- a number that will be multiplied by each element in the array - - """ - cdef int m, n - - m, n = input.shape[0], input.shape[1] - - c_multiply (&input[0,0], value, m, n) - - return None - -def multiply2(np.ndarray[double, ndim=2, mode="c"] input not None, double value): - """ - this method works fine, but is not as future-proof the nupy API might change, etc. - """ - cdef int m, n - - m, n = input.shape[0], input.shape[1] - - c_multiply (<double*> input.data, value, m, n) - - return None
\ No newline at end of file |