retn, vcf = lal.swig_lal_test_copyinout_gsl_vector_complex_float(vcf)
assert (retn)
assert ((vcf.data == 3 * vcfdat).all())
vcf = vcfdat
retn, vcf = lal.swig_lal_test_copyinout_gsl_vector_complex_float(vcf)
assert (retn)
assert ((vcf == 3 * vcfdat).all())
del vcf
del vcfout
del vcfdat
lal.CheckMemoryLeaks()
vcd = lal.gsl_vector_complex(len(vcddat))
vcd.data = vcddat
vcdout = lal.gsl_vector_complex(len(vcddat))
vcdout.data = numpy.zeros(numpy.shape(vcddat), dtype=vcddat.dtype)
assert (lal.swig_lal_test_viewin_gsl_vector_complex(vcdout, vcd))
assert ((vcdout.data == vcd.data).all())
vcdout.data = numpy.zeros(numpy.shape(vcddat), dtype=vcddat.dtype)
assert (lal.swig_lal_test_viewin_gsl_vector_complex(vcdout, vcddat))
assert ((vcdout.data == vcddat).all())
vcdout.data = numpy.zeros(numpy.shape(vcddat), dtype=vcddat.dtype)
assert (lal.swig_lal_test_viewinout_gsl_vector_complex(vcdout, vcd))
assert ((2 * vcdout.data == vcd.data).all())
vcdout.data = numpy.zeros(numpy.shape(vcddat), dtype=vcddat.dtype)
assert (lal.swig_lal_test_viewinout_gsl_vector_complex(vcdout, vcddat))
assert ((2 * vcdout.data == vcddat).all())
vcd.data = vcddat
assert (lal.swig_lal_test_copyinout_gsl_vector_complex(vcd))
assert ((vcd.data == 3 * vcddat).all())
vcd.data = vcddat
retn, vcd = lal.swig_lal_test_copyinout_gsl_vector_complex(vcd)
Beispiel #2
0
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))
vcd.data = vcddat
vcdout = lal.gsl_vector_complex(len(vcddat))
vcdout.data = numpy.zeros(numpy.shape(vcddat), dtype=vcddat.dtype)
assert(lal.swig_lal_test_viewin_gsl_vector_complex(vcdout, vcd))
assert((vcdout.data == vcd.data).all())
vcdout.data = numpy.zeros(numpy.shape(vcddat), dtype=vcddat.dtype)
assert(lal.swig_lal_test_viewin_gsl_vector_complex(vcdout, vcddat))
assert((vcdout.data == vcddat).all())
vcdout.data = numpy.zeros(numpy.shape(vcddat), dtype=vcddat.dtype)
assert(lal.swig_lal_test_viewinout_gsl_vector_complex(vcdout, vcd))
assert((2 * vcdout.data == vcd.data).all())
vcdout.data = numpy.zeros(numpy.shape(vcddat), dtype=vcddat.dtype)
assert(lal.swig_lal_test_viewinout_gsl_vector_complex(vcdout, vcddat))
assert((2 * vcdout.data == vcddat).all())
del vcd
del vcdout
del vcddat
lal.CheckMemoryLeaks()
mfdat = numpy.array([[1.2, 2.3, 3.4], [4.5, 5.6, 6.7]], dtype=numpy.float32)