<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.16.3">
</HEAD>
<BODY>
Hi,<BR>
<BR>
I wrote a function to speedup a part of my Python code that manipulates<BR>
python list objects. I do stg like:<BR>
<BR>
void&nbsp; Foo(numeric::array&amp; X, numeric::array&amp; Y, bool flag, list max_points, list min_points,<BR>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list left_max_points, list right_max_points){<BR>
&nbsp;&nbsp;&nbsp; ...<BR>
&nbsp;&nbsp;&nbsp; ...<BR>
&nbsp;&nbsp;&nbsp; int Lmax = boost::python::extract&lt;int&gt;(max_points.attr(&quot;__len__&quot;)());<BR>
&nbsp;&nbsp;&nbsp; ...<BR>
&nbsp;&nbsp;&nbsp; ...<BR>
}<BR>
<BR>
It compiles, but it crashes with segmentation fault, at the line where I try get the length of max_points, <BR>
which is a list.<BR>
<BR>
I don't understand why !<BR>
<BR>
any help ?<BR>
<BR>
Thanks in advance<BR>
<BR>
Chris
</BODY>
</HTML>