Fix saving lists of arrays with recent versions of numpy
[qpms.git] / qpms / vecprint.c
blob96599fcd8b8654b0e6084ea3f8cbf43be081d3a4
1 #include <assert.h>
2 #include "vectors.h"
3 #include "complex.h"
4 #include <stdio.h>
6 void print_csphvec(csphvec_t v)
8 printf("(%g+%gj)r̂ + (%g+%gj)θ̂ + (%g+%gj)φ̂",
9 creal(v.rc), cimag(v.rc),
10 creal(v.thetac), cimag(v.thetac),
11 creal(v.phic), cimag(v.phic)
16 void print_cart3(cart3_t v)
18 printf("%gx̂ + %gŷ + %gẑ", v.x, v.y, v.z);
21 void print_ccart3(ccart3_t v)
23 printf("(%g+%gj)x̂ + (%g+%gj)ŷ + (%g+%gj)ẑ",
24 creal(v.x), cimag(v.x),
25 creal(v.y), cimag(v.y),
26 creal(v.z), cimag(v.z)
30 void print_sph(sph_t r)
32 printf("(r=%g, θ=%g, φ=%g)", r.r, r.theta, r.phi);