assert ((vf == 3 * vfdat).all()) del vf del vfout del vfdat lal.CheckMemoryLeaks() vd = lal.gsl_vector(len(vddat)) vd.data = vddat vdout = lal.gsl_vector(len(vddat)) vdout.data = numpy.zeros(numpy.shape(vddat), dtype=vddat.dtype) assert (lal.swig_lal_test_viewin_gsl_vector(vdout, vd)) assert ((vdout.data == vd.data).all()) vdout.data = numpy.zeros(numpy.shape(vddat), dtype=vddat.dtype) assert (lal.swig_lal_test_viewin_gsl_vector(vdout, vddat)) 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()) vd.data = vddat assert (lal.swig_lal_test_copyinout_gsl_vector(vd)) assert ((vd.data == 3 * vddat).all()) vd.data = vddat 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())
assert((2 * vfout.data == vfdat).all()) del vf del vfout del vfdat lal.CheckMemoryLeaks() vd = lal.gsl_vector(len(vddat)) vd.data = vddat vdout = lal.gsl_vector(len(vddat)) vdout.data = numpy.zeros(numpy.shape(vddat), dtype=vddat.dtype) assert(lal.swig_lal_test_viewin_gsl_vector(vdout, vd)) assert((vdout.data == vd.data).all()) vdout.data = numpy.zeros(numpy.shape(vddat), dtype=vddat.dtype) assert(lal.swig_lal_test_viewin_gsl_vector(vdout, vddat)) 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)