|
11 | 11 |
|
12 | 12 | ## Build and install with pip |
13 | 13 |
|
14 | | -(TODO: DOES NOT WORK YET) |
| 14 | +See `setup.py` for supported configuration overrides, including the libtiledb path. |
15 | 15 |
|
16 | 16 | ``` |
17 | | -CMAKE_ARGS="-DTileDB_DIR=/Users/inorton/work/bld/TileDB-2.15/rel/dist/lib/cmake/TileDB" pip install -e |
| 17 | +pip install -e . |
18 | 18 | ``` |
19 | 19 |
|
20 | 20 | ## Direct build, then export PYTHONPATH |
@@ -53,59 +53,4 @@ export PYTHONPATH= ~/work/bld/fvp-build/python |
53 | 53 |
|
54 | 54 | ``` |
55 | 55 | import tiledbvspy |
56 | | -``` |
57 | | - |
58 | | -# ==== |
59 | | - |
60 | | -X. Usage example |
61 | | - |
62 | | -``` |
63 | | -In [1]: import tiledbvspy |
64 | | -
|
65 | | -In [2]: v = tiledbvspy.get_v() |
66 | | -
|
67 | | -In [3]: v_np = np.array(v) |
68 | | ---------------------------------------------------------------------------- |
69 | | -NameError Traceback (most recent call last) |
70 | | -Input In [3], in <cell line: 1>() |
71 | | -----> 1 v_np = np.array(v) |
72 | | -
|
73 | | -NameError: name 'np' is not defined |
74 | | -
|
75 | | -In [4]: import tiledbvspy, numpy as np |
76 | | -
|
77 | | -In [5]: v_np = np.array(v) |
78 | | -
|
79 | | -In [6]: v_np |
80 | | -Out[6]: array([1., 2., 3., 4., 5., 6., 7.], dtype=float32) |
81 | | -
|
82 | | -In [7]: v_np[1] = 10 |
83 | | -
|
84 | | -In [8]: v |
85 | | -Out[8]: <tiledbvspy.Vector_f32 at 0x103030db0> |
86 | | -
|
87 | | -In [9]: v[1] |
88 | | -Out[9]: 2.0 |
89 | | -
|
90 | | -In [10]: v[0] |
91 | | -Out[10]: 1.0 |
92 | | -
|
93 | | -In [11]: v[2] |
94 | | -Out[11]: 3.0 |
95 | | -
|
96 | | -In [12]: v[3] |
97 | | -Out[12]: 4.0 |
98 | | -
|
99 | | -In [13]: v_np_view = np.array(v, copy=False) |
100 | | -
|
101 | | -In [14]: v_np_view |
102 | | -Out[14]: array([1., 2., 3., 4., 5., 6., 7.], dtype=float32) |
103 | | -
|
104 | | -In [15]: v_np_view[2] = 12.5 |
105 | | -
|
106 | | -In [16]: v_np_view |
107 | | -Out[16]: array([ 1. , 2. , 12.5, 4. , 5. , 6. , 7. ], dtype=float32) |
108 | | -
|
109 | | -In [17]: v[2] |
110 | | -Out[17]: 12.5 # original data modified |
111 | | -``` |
| 56 | +``` |
0 commit comments