Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.core
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
Model registry
Operate
Environments
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.core
Commits
68200670
Commit
68200670
authored
9 years ago
by
Manuel Günther
Browse files
Options
Downloads
Patches
Plain Diff
Now returning the correct type (numpy.ndarray, not bob.blitz.array) in convert()
parent
413a698c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/core/convert.cpp
+3
-3
3 additions, 3 deletions
bob/core/convert.cpp
with
3 additions
and
3 deletions
bob/core/convert.cpp
+
3
−
3
View file @
68200670
...
@@ -35,17 +35,17 @@ PyObject* inner_convert (PyBlitzArrayObject* src,
...
@@ -35,17 +35,17 @@ PyObject* inner_convert (PyBlitzArrayObject* src,
if
(
dst_min
)
{
//both src_range and dst_range are valid
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
);
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
//only src_range is valid
auto
bz_dst
=
convertFromRange
<
Tdst
,
Tsrc
>
(
*
bz_src
,
c_src_min
,
c_src_max
);
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
else
if
(
dst_min
)
{
//only dst_range is valid
auto
bz_dst
=
convertToRange
<
Tdst
,
Tsrc
>
(
*
bz_src
,
c_dst_min
,
c_dst_max
);
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
//use all defaults
...
...
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