, see the following class:
template struct ublas_vector_from_numpy
Regards,
Ravi
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
ay is deleted? The array must be deleted from either the python
side (via numpy) or from the C++ side (by yourself). Handling this problem is
the cause for much of my code (which may still be too heavyweight for you).
Regards,
Ravi
___
Cplusplus-sig ma
tp://blog.enthought.com/?p=62 for information on fixing
this issue. The code I pointed out earlier encapsulates this using a custom
deleter in C++ which can be used independently of ublas.
Regards,
Ravi
___
Cplusplus-sig mailing list
tor of A and a decref in the
destructor of A.
> And is there a way to get the refcount of an object within Python? I'd
> like to test if the refcount is correct.
sys.getrefcount(obj)
Regards,
Ravi
___
Cplusplus-sig mailing list
Cplusplu
etrefcount(a)= 2
> sys.getrefcount(a.my_array)= 2
>
> --- end output
>
> Ermm, is that good?
> I expected that the refcount would be 1 and not 2.
I don't know. I generally avoid these issues by writing custom converters and
letting boost.python handle refere
- Stefan Seefeld
- Ralf Grosse-Kunstleve
- Roman Yakovenko
You might try contacting them off list or on c++-sig (cc'ed on this email).
> Also thanks Ravi for a list of features that may be candidates for
> this project. I will dive into Boost.Python source code to see more
> about the
things
> up?
This is not a boost.python question; I doubt we have very many users of weave
here. You may have better luck asking on the numpy lists (numpy-
discuss...@scipy.org).
Regards,
Ravi
___
Cplusplus-sig mailing list
Cplusplus-sig@python.or
sts for you to try.
Regards,
Ravi
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
fundamental PyTypeObject used
by boost.python but nothing popped out on a cursory look, but then I doubt
anyone can find bugs in Dave's code upon cursory examination :-)
I am not sure that I can spend enough time on this prior to the end of your
GSOC period. Apologies.
Regards,
Ravi
of X as seen by python; for example, the functor would have an
argument type 'double' and would then internally convert the received 'double'
argument from the python side into some custom type prior to passing it to the
member function of X. In other words, the functor would
internals of boost.python, and only just now got
> this working... Do you see problems with this, specifically the
> conversion of get_signature from function to metafunction?
I don't see any problems with the conversion of get_signature to a
metafunction. Do compile times get an
lems with the conversion of get_signature to a
> > metafunction. Do compile times get any longer?
>
> I haven't checked this yet. I have other concerns re typechecking and
> automatic conversions...
Care to elaborate?
Regards,
Ravi
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
8-October/013825.html
which supports numpy arrays with and without copying, along with pass by
reference and pass by value.
Regards,
Ravi
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
> .def("nonstatic_doit", &Foo::nonstatic_doit)
> ;
> }
Regards,
Ravi
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
rap the raw pointer in a struct and then
expose converters to it:
struct Mat { struct _p_Mat *ptr; };
If you come up with a better way, I'd be interested.
Regards,
Ravi
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python
s safer than
>
>def("foo", (void(*)(int)) foo);
>
> and just as safe as, and less verbose than
>
>void(*fooint)(int) = foo;
>def("foo", fooint);
>
> So that's where I'm at... what do you make of that interface?
This is very co
;
// my_converter uses the components typedef
typedef typename my_converter::type Q;
Q q;
class_( "Obj" )
.def( "my_func", q )
;
Regards,
Ravi
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
e
> return type. I'm going to have to think about that one a bit more.
Did you have any ideas on this, Troy? This is the last bit I think I'd need in
order to replace my code with yours.
Regards,
Ravi
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
On Tuesday 05 January 2010 12:26:27 Nicolas Lelong wrote:
> Is this mailing list the best route to submit this patch, what more work
> should be done to get it accepted into trunk ?
Please file a trac ticket at svn.boost.org so that this does not get lost.
now.
> I was only playing with your use case, tossing my results out there.
> Ravi and I discussed the as<...> interface at length on this list some
> time ago, and I've recently resumed playing with it.
I am quite concerned about the divergence. How could I help integrate yo
ries as your core
code since the coupling will be hard to undo while gaining nothing.
Regards,
Ravi
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
ocumentation:
http://www.boost.org/doc/libs/1_47_0/libs/python/doc/tutorial/doc/html/python/exposing.html#python.virtual_functions_with_default_implementations
Regards,
Ravi
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig
t email. It's a very nice separation, though after bad experiences
> using SWIG I am a little wary about trying to build a one-size-fits-all
> front-end for different languages.
Is code for boost.langbinding available anywhere? Or is it currently only
23 matches
Mail list logo