예제 #1
0
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())
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
예제 #2
0
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)
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