| 35 | #endif |
| 36 | |
| 37 | matrix matrixFromArray(const NumpyArrayType& f) |
| 38 | { |
| 39 | object o=f.attr("shape"); |
| 40 | object o1=o[0]; |
| 41 | object o2=o[1]; |
| 42 | int l1=extract<int>(o1); |
| 43 | int l2=extract<int>(o2); |
| 44 | matrix m=mpNew(l1,l2); |
| 45 | for(int i=0;i<l1;i++) |
| 46 | { |
| 47 | for(int j=0;j<l2;j++) |
| 48 | { |
| 49 | Poly& x = boost::python::extract<Poly&>(f[boost::python::make_tuple(i,j)]); |
| 50 | poly p=x.as_poly(); |
| 51 | MATELEM(m,i+1,j+1)=p; |
| 52 | } |
| 53 | } |
| 54 | return m; |
| 55 | } |
| 56 | bool is_builtin(const char* name) |
| 57 | { |
| 58 | int cmd_n=-1; |
no test coverage detected