Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.core
Commits
68200670
Commit
68200670
authored
Nov 30, 2015
by
Manuel Günther
Browse files
Now returning the correct type (numpy.ndarray, not bob.blitz.array) in convert()
parent
413a698c
Changes
1
Hide whitespace changes
Inline
Side-by-side
bob/core/convert.cpp
View file @
68200670
...
...
@@ -35,17 +35,17 @@ PyObject* inner_convert (PyBlitzArrayObject* src,
if
(
dst_min
)
{
//both src_range and dst_range are valid
auto
bz_dst
=
convert
<
Tdst
,
Tsrc
>
(
*
bz_src
,
c_dst_min
,
c_dst_max
,
c_src_min
,
c_src_max
);
return
PyBlitzArrayCxx_
NewFromArra
y
(
bz_dst
);
return
PyBlitzArrayCxx_
AsNump
y
(
bz_dst
);
}
//only src_range is valid
auto
bz_dst
=
convertFromRange
<
Tdst
,
Tsrc
>
(
*
bz_src
,
c_src_min
,
c_src_max
);
return
PyBlitzArrayCxx_
NewFromArra
y
(
bz_dst
);
return
PyBlitzArrayCxx_
AsNump
y
(
bz_dst
);
}
else
if
(
dst_min
)
{
//only dst_range is valid
auto
bz_dst
=
convertToRange
<
Tdst
,
Tsrc
>
(
*
bz_src
,
c_dst_min
,
c_dst_max
);
return
PyBlitzArrayCxx_
NewFromArra
y
(
bz_dst
);
return
PyBlitzArrayCxx_
AsNump
y
(
bz_dst
);
}
//use all defaults
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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