Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LEFEBVREJP email
radix
Commits
4ec904f3
Commit
4ec904f3
authored
Jan 11, 2019
by
Purves, Murray
Browse files
WIP Amending build to use static lib
parent
3a5a05b0
Changes
4
Hide whitespace changes
Inline
Side-by-side
radixmath/interpolate.hh
View file @
4ec904f3
...
...
@@ -13,7 +13,7 @@
namespace
radix
{
template
<
typename
T
>
extern
std
::
vector
<
T
>
RADIX_PUBLIC
interpolateValues
(
std
::
vector
<
T
>
RADIX_PUBLIC
interpolateValues
(
const
std
::
vector
<
T
>
&
baseValues
,
const
std
::
vector
<
T
>
&
valuesToInterpolate
,
const
bool
circular
=
false
,
const
T
missingValue
=
-
9999.
f
);
...
...
radixmath/python/interpolatemodule.cc
View file @
4ec904f3
...
...
@@ -7,7 +7,7 @@
#include
"python_utils.hh"
static
PyObject
*
interpolate
V
alues
(
PyObject
*
self
,
PyObject
*
args
)
static
PyObject
*
interpolate
_v
alues
(
PyObject
*
self
,
PyObject
*
args
)
{
PyObject
*
baseValuesObj
;
PyObject
*
valuesToInterpObj
;
...
...
@@ -38,7 +38,7 @@ static PyObject* interpolateValues(PyObject* self, PyObject* args)
return
interpolatedValuesObj
;
}
// static PyObject* interpolate
V
alues(PyObject* self, PyObject* args)
// static PyObject* interpolate
_v
alues(PyObject* self, PyObject* args)
// {
// int input;
// if (!PyArg_ParseTuple(args, "i", &input))
...
...
@@ -52,7 +52,7 @@ static PyObject* interpolateValues(PyObject* self, PyObject* args)
// }
static
PyMethodDef
interpolate_methods
[]
=
{
{
"interpolate
V
alues"
,
interpolate
V
alues
,
METH_VARARGS
,
"Interpolate/extrapolate missing values from a data vector"
},
{
"interpolate
_v
alues"
,
interpolate
_v
alues
,
METH_VARARGS
,
"Interpolate/extrapolate missing values from a data vector"
},
{
NULL
,
NULL
,
0
,
NULL
},
};
...
...
radixmath/python/setup.py
View file @
4ec904f3
from
distutils.core
import
setup
,
Extension
import
sys
libraries
=
[]
library_dirs
=
[]
static_lib_dir
=
"/Users/ohp/project/build/radix/radixmath"
static_libraries
=
[
"radixmath"
]
extra_objects
=
[]
# Add radix libraries to build - platform dependent
if
sys
.
platform
==
"win32"
:
libraries
.
extend
(
static_libraries
)
library_dirs
.
extend
(
static_lib_dir
)
else
:
extra_objects
=
[
'{}/lib{}.a'
.
format
(
static_lib_dir
,
l
)
for
l
in
static_libraries
]
interpolate_module
=
Extension
(
'interpolate'
,
sources
=
[
'interpolatemodule.cc'
],
language
=
'C++'
,
libraries
=
libraries
,
library_dirs
=
library_dirs
,
extra_objects
=
extra_objects
,
)
setup
(
...
...
radixmath/python/test.py
View file @
4ec904f3
...
...
@@ -12,7 +12,7 @@ expect_values = [1.0, 2.0, 3.0, 4.5, 6.0, 3.5, 1.0]
print
(
"Base values: "
,
str
(
base_values
))
print
(
"Before interpolation: "
,
str
(
interp_values
))
test_values
=
interpolate
.
interpolate
V
alues
(
base_values
,
interp_values
,
test_values
=
interpolate
.
interpolate
_v
alues
(
base_values
,
interp_values
,
circular
,
missing_value
)
print
(
"After interpolation: "
,
str
(
interp_values
))
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment