#include "gs2crmod_ext.h" VALUE gs2crmod_tensor_complexes_field_gsl_tensor_complex_2(VALUE self, VALUE options) { VALUE field, field_complex, field_narray; VALUE field_complex_narray; VALUE cgsl_tensor_complex; VALUE ccomplex; VALUE shape; int *c_shape; int i, j, k; ccomplex = RGET_CLASS_TOP("Complex"); field = RFCALL_11("field_gsl_tensor", options); cgsl_tensor_complex = RGET_CLASS(cgsl, "TensorComplex"); shape = rb_funcall(field, rb_intern("shape"), 0); /*rb_p(shape);*/ CR_INT_ARY_R2C_STACK(shape, c_shape); field_complex = rb_funcall3(cgsl_tensor_complex, rb_intern("alloc"), 3, RARRAY_PTR(shape)); field_narray = RFCALL_10_ON(field, "narray"); field_complex_narray = RFCALL_10_ON(field_complex, "narray"); /*rb_p(field_complex);*/ for (i=0;i