retn, vd = lal.swig_lal_test_copyinout_gsl_vector(vd) assert (retn) assert ((vd.data == 3 * vddat).all()) vd = vddat retn, vd = lal.swig_lal_test_copyinout_gsl_vector(vd) assert (retn) assert ((vd == 3 * vddat).all()) del vd del vdout del vddat lal.CheckMemoryLeaks() vcf = lal.gsl_vector_complex_float(len(vcfdat)) vcf.data = vcfdat vcfout = lal.gsl_vector_complex_float(len(vcfdat)) vcfout.data = numpy.zeros(numpy.shape(vcfdat), dtype=vcfdat.dtype) assert (lal.swig_lal_test_viewin_gsl_vector_complex_float(vcfout, vcf)) assert ((vcfout.data == vcf.data).all()) vcfout.data = numpy.zeros(numpy.shape(vcfdat), dtype=vcfdat.dtype) assert (lal.swig_lal_test_viewin_gsl_vector_complex_float(vcfout, vcfdat)) assert ((vcfout.data == vcfdat).all()) vcfout.data = numpy.zeros(numpy.shape(vcfdat), dtype=vcfdat.dtype) assert (lal.swig_lal_test_viewinout_gsl_vector_complex_float(vcfout, vcf)) assert ((2 * vcfout.data == vcf.data).all()) vcfout.data = numpy.zeros(numpy.shape(vcfdat), dtype=vcfdat.dtype) assert (lal.swig_lal_test_viewinout_gsl_vector_complex_float(vcfout, vcfdat)) assert ((2 * vcfout.data == vcfdat).all()) vcf.data = vcfdat assert (lal.swig_lal_test_copyinout_gsl_vector_complex_float(vcf)) assert ((vcf.data == 3 * vcfdat).all()) vcf.data = vcfdat retn, vcf = lal.swig_lal_test_copyinout_gsl_vector_complex_float(vcf)
assert((vdout.data == vddat).all()) vdout.data = numpy.zeros(numpy.shape(vddat), dtype=vddat.dtype) assert(lal.swig_lal_test_viewinout_gsl_vector(vdout, vd)) assert((2 * vdout.data == vd.data).all()) vdout.data = numpy.zeros(numpy.shape(vddat), dtype=vddat.dtype) assert(lal.swig_lal_test_viewinout_gsl_vector(vdout, vddat)) assert((2 * vdout.data == vddat).all()) del vd del vdout del vddat lal.CheckMemoryLeaks() vcf = lal.gsl_vector_complex_float(len(vcfdat)) vcf.data = vcfdat vcfout = lal.gsl_vector_complex_float(len(vcfdat)) vcfout.data = numpy.zeros(numpy.shape(vcfdat), dtype=vcfdat.dtype) assert(lal.swig_lal_test_viewin_gsl_vector_complex_float(vcfout, vcf)) assert((vcfout.data == vcf.data).all()) vcfout.data = numpy.zeros(numpy.shape(vcfdat), dtype=vcfdat.dtype) assert(lal.swig_lal_test_viewin_gsl_vector_complex_float(vcfout, vcfdat)) assert((vcfout.data == vcfdat).all()) vcfout.data = numpy.zeros(numpy.shape(vcfdat), dtype=vcfdat.dtype) assert(lal.swig_lal_test_viewinout_gsl_vector_complex_float(vcfout, vcf)) assert((2 * vcfout.data == vcf.data).all()) vcfout.data = numpy.zeros(numpy.shape(vcfdat), dtype=vcfdat.dtype) assert(lal.swig_lal_test_viewinout_gsl_vector_complex_float(vcfout, vcfdat)) assert((2 * vcfout.data == vcfdat).all()) del vcf del vcfout del vcfdat lal.CheckMemoryLeaks() vcd = lal.gsl_vector_complex(len(vcddat))