Extending Boost.Python with NumPy support
Hello, I'm presently working on a few improvements to the Boost.Python module. As part of this I'm refactoring the numeric API to actually support NumPy. There has been quite a lot of effort we put into this in the past (notably a GSoC project I mentored a few years ago), but we never managed to include this into the Boost master branch, so it's never been formally released. As I'm now getting ready to polish this work off, I wonder whether any of this would require a formal submission as a new Boost library, or whether it can just be done under the Boost.Python umbrella ? I reckon this is somewhat of a gray area, so I'd like to clarify whether there are concrete rules for what changes / additions require a formal review process. Thanks, Stefan -- ...ich hab' noch einen Koffer in Berlin...
On September 30, 2016 11:55:59 AM EDT, Stefan Seefeld
I wonder whether any of this would require a formal submission as a new Boost library, or whether it can just be done under the Boost.Python umbrella ? I reckon this is somewhat of a gray area, so I'd like to clarify whether there are concrete rules for what changes / additions require a formal review process.
The maintainer gets to decide: "You are free to change your library in any way you wish, and you are encouraged to actively make improvements. However, peer review is an important part of the Boost process and as such you are also encouraged to get feedback from the boost community before making substantial changes to the interface of an accepted library." (From http://www.boost.org/community/reviews.html#Maintainer) -- Rob (Sent from my portable computation device.)
On Oct 2, 2016 5:55 AM, "Rob Stewart"
On September 30, 2016 11:55:59 AM EDT, Stefan Seefeld
I wonder whether any of this would require a formal submission as a new Boost library, or whether it can just be done under the Boost.Python umbrella ? I reckon this is somewhat of a gray area, so I'd like to clarify whether there are concrete rules for what changes / additions require a formal review process.
The maintainer gets to decide:
"You are free to change your library in any way you wish, and you are encouraged to actively make improvements. However, peer review is an important part of the Boost process and as such you are also encouraged to get feedback from the boost community before making substantial changes to
wrote: the interface of an accepted library."
(From http://www.boost.org/community/reviews.html#Maintainer)
Right, I know that text (being the Boost.Python maintainer) :-) I'm fully confident concerning the new code's quality. What makes me wonder (and triggered my mail) is that the change in its current form will introduce * a new library (boost_numpy) * a new top-level header (boost/numpy.hpp) * a new top-level namespace (boost::numpy) Thoughts ? Thanks, Stefan
On October 2, 2016 6:20:27 PM EDT, Stefan Seefeld
On September 30, 2016 11:55:59 AM EDT, Stefan Seefeld
wrote: I wonder whether any of this would require a formal submission as a new Boost library,
or
whether it can just be done under the Boost.Python umbrella ? I reckon this is somewhat of a gray area, so I'd like to clarify whether
are concrete rules for what changes / additions require a formal review process.
The maintainer gets to decide:
"You are free to change your library in any way you wish, and you are encouraged to actively make improvements. However, peer review is an important part of the Boost process and as such you are also encouraged to get feedback from the boost community before making substantial changes to
On Oct 2, 2016 5:55 AM, "Rob Stewart"
wrote: there the interface of an accepted library." (From http://www.boost.org/community/reviews.html#Maintainer)
Right, I know that text (being the Boost.Python maintainer) :-) I'm fully confident concerning the new code's quality. What makes me wonder (and triggered my mail) is that the change in its current form will introduce
* a new library (boost_numpy)
How is a new library part of Boost.Python? It seems a review is needed for that.
* a new top-level header (boost/numpy.hpp) * a new top-level namespace (boost::numpy)
Those are part of the first item as I see them. -- Rob (Sent from my portable computation device.)
On 03.10.2016 08:13, Rob Stewart wrote:
On October 2, 2016 6:20:27 PM EDT, Stefan Seefeld
wrote: Right, I know that text (being the Boost.Python maintainer) :-) I'm fully confident concerning the new code's quality. What makes me wonder (and triggered my mail) is that the change in its current form will introduce
* a new library (boost_numpy) How is a new library part of Boost.Python? It seems a review is needed for that.
Conceptually it's not a new library. It's the result of some refactoring / extension of Boost.Python. The API provided by the boost/python/numeric.hpp header is *very* old and outdated, as that API hasn't kept up with the evolution of the equivalent APIs inside Python. Everyone in the Python world who's doing numeric computations uses NumPy, so using Boost.Python wrappers for that instead of boost/python/numeric.hpp is the obvious choice. But since not every Boost.Python user needs NumPy support, I don't want to build that into the libboost_python library itself ("don't pay for what you don't need"), but rather compile a separate library next to it.
* a new top-level header (boost/numpy.hpp) * a new top-level namespace (boost::numpy) Those are part of the first item as I see them.
Not quite: Whether to build a single binary or not is a practical choice, and there are other cases where a single module can produce additional (optional) libraries depending on whether prerequisite libraries are available at build time (example: Boost.MPI and its Python bindings) Whether the new API lives in a top-level namespace (boost::numpy) or not (boost::python::numeric or boost::python::numpy) is secondary IMO. If that choice influences whether I have to go through a formal review process I'll surely opt for the simpler and more expedient choice. (But to be honest, I'm not so much afraid of the review itself as of the ETA for it, given the current pace at which reviews are done.) Thanks, Stefan -- ...ich hab' noch einen Koffer in Berlin...
Stefan Seefeld wrote:
Whether the new API lives in a top-level namespace (boost::numpy) or not (boost::python::numeric or boost::python::numpy) is secondary IMO.
Logically, if this new library can't be used without Boost.Python, it's more of a sublibrary/extension to Boost.Python rather than a separate library. So it would make more sense, in my opinion, to have it in boost::python.
On October 3, 2016 4:38:16 PM EDT, Peter Dimov
Stefan Seefeld wrote:
Whether the new API lives in a top-level namespace (boost::numpy) or not (boost::python::numeric or boost::python::numpy) is secondary IMO.
Logically, if this new library can't be used without Boost.Python, it's more of a sublibrary/extension to Boost.Python rather than a separate library. So it would make more sense, in my opinion, to have it in boost::python.
+1 -- Rob (Sent from my portable computation device.)
On 4/10/2016 09:38, Peter Dimov wrote:
Stefan Seefeld wrote:
Whether the new API lives in a top-level namespace (boost::numpy) or not (boost::python::numeric or boost::python::numpy) is secondary IMO.
Logically, if this new library can't be used without Boost.Python, it's more of a sublibrary/extension to Boost.Python rather than a separate library. So it would make more sense, in my opinion, to have it in boost::python.
+1 Boost has a sub-library structure; it should be used for this case. (As a sub-library, it's entirely up to the Boost.Python maintainers and does not require separate review. As a top-level library, it would need at least a mini review, if not a full review. Or at least that's the way I see it.)
-----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Stefan Seefeld Sent: 03 October 2016 21:27 To: boost@lists.boost.org Subject: Re: [boost] Extending Boost.Python with NumPy support
On 03.10.2016 08:13, Rob Stewart wrote:
On October 2, 2016 6:20:27 PM EDT, Stefan Seefeld
wrote: Right, I know that text (being the Boost.Python maintainer) :-) I'm fully confident concerning the new code's quality. What makes me wonder (and triggered my mail) is that the change in its current form will introduce
* a new library (boost_numpy) How is a new library part of Boost.Python? It seems a review is needed for that.
Conceptually it's not a new library. It's the result of some refactoring/extension of Boost.Python.
<big snip> To me, it sounds like maintenance (after discussions) not requiring a review. If anyone really doesn't like it, they can always shout on the Boost Lists? Paul --- Paul A. Bristow Prizet Farmhouse Kendal UK LA8 8AB +44 (0) 1539 561830
participants (5)
-
Gavin Lambert
-
Paul A. Bristow
-
Peter Dimov
-
Rob Stewart
-
Stefan Seefeld