|
53 | 53 | "outputs": [], |
54 | 54 | "source": [ |
55 | 55 | "array_float_2d = np.arange(12,dtype=np.float_).reshape(4,3)\n", |
56 | | - "array_float_2d " |
| 56 | + "array_float_2d" |
57 | 57 | ] |
58 | 58 | }, |
59 | 59 | { |
|
65 | 65 | "outputs": [], |
66 | 66 | "source": [ |
67 | 67 | "array_complex_2d = array_complex_1d.reshape(2,5)\n", |
68 | | - "array_complex_2d " |
| 68 | + "array_complex_2d" |
69 | 69 | ] |
70 | 70 | }, |
71 | 71 | { |
|
97 | 97 | "}\n", |
98 | 98 | "for filename, array in savenames.items():\n", |
99 | 99 | " with open(os.path.join(output_dir,filename+'.npy'), 'w') as f:\n", |
100 | | - " np.save(f, array_complex_1d)" |
| 100 | + " np.save(f, array_complex_1d)\n", |
| 101 | + " with open(os.path.join(output_dir,filename+'.txt'), 'w') as f:\n", |
| 102 | + " np.savetxt(f, array_complex_1d)" |
101 | 103 | ] |
102 | 104 | }, |
103 | 105 | { |
|
129 | 131 | "source": [ |
130 | 132 | "outfile = os.path.join(output_dir, 'mock_uvw_vis.npz')\n", |
131 | 133 | "with open(outfile, 'w') as f:\n", |
132 | | - " np.savez(f, uvw=mock_uvw, vis=array_complex_1d)" |
| 134 | + " np.savez(f, uvw=mock_uvw, vis=array_complex_1d)\n", |
| 135 | + "\n", |
| 136 | + "with open(os.path.join(output_dir,'mock_uvw.txt'), 'w') as f:\n", |
| 137 | + " np.savetxt(f, mock_uvw)\n", |
| 138 | + "with open(os.path.join(output_dir,'mock_vis.txt'), 'w') as f:\n", |
| 139 | + " np.savetxt(f, array_complex_1d)" |
133 | 140 | ] |
134 | 141 | }, |
135 | 142 | { |
|
209 | 216 | } |
210 | 217 | }, |
211 | 218 | "nbformat": 4, |
212 | | - "nbformat_minor": 1 |
| 219 | + "nbformat_minor": 0 |
213 | 220 | } |
0 commit comments