I wrote:

> [..]
>
> However, something like the following may suit your use case. (For the
> header-args property see section 15.2 (Using Header Arguments) of the
> manual.)
>
> * A Heading
> :PROPERTIES:
> :header-args: :var table=table_foo
> :END:
>
> #+NAME: table_foo
> | foo |
> |-----|
> |  42 |
> | 100 |
>
> #+NAME: import
> #+BEGIN_SRC python
> import numpy as np
> table = np.array(table).astype(np.float).flatten()
> #+END_SRC
>
> #+BEGIN_SRC python :noweb yes :tangle import_noweb.py
> <<import>>
> #+END_SRC

Just the following works too, of course:

#+NAME: table_foo
| foo |
|-----|
|  42 |
| 100 |

#+NAME: import
#+BEGIN_SRC python
import numpy as np
table = np.array(table).astype(np.float).flatten()
#+END_SRC

#+BEGIN_SRC python :noweb yes :var table=table_foo :tangle import_noweb.py
<<import>>
#+END_SRC

Reply via email to