You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed along with the example and generated and refined a tree object over a 2d function. Once this is done, how can I get the grid object? The data that includes the points and values?
I tried accessing vis.convert_to_uniform(tree) but this gives me a TypeError
~\miniconda3\lib\site-packages\ndtamr\Vis.py in convert_to_uniform(tree, dims, slice_, q, func, mask, alpha_func, pad)
258 a = alpha_func(n)
259 if lvl == lmax:
--> 260 result[i,j] = d
261 alpha[i,j] = a
262 mask_arr[i,j] = m
TypeError: float() argument must be a string or a number, not 'Node'
The text was updated successfully, but these errors were encountered:
@mzajd
I was able to extract the grid nodes and plot them, maybe this is helpful
`grid = vis.generate_grid(t)
print("\ninitial grid points:", grid)
coords = []
x = []
y = []
for i in range(len(grid)):
for j in range(len(grid[i])):
coords.append(grid[i][j])
x.append(grid[i][j][0])
y.append(grid[i][j][1])
print("coordinates:", coords)
print("x:", x)
print("y:", y)
Hello,
I followed along with the example and generated and refined a tree object over a 2d function. Once this is done, how can I get the grid object? The data that includes the points and values?
I tried accessing vis.convert_to_uniform(tree) but this gives me a TypeError
TypeError Traceback (most recent call last)
in
----> 1 vis.convert_to_uniform(t,dims=[0,1],func=lambda x: x,mask=lambda x: False,alpha_func=lambda x: 1,pad=None)
~\miniconda3\lib\site-packages\ndtamr\Vis.py in convert_to_uniform(tree, dims, slice_, q, func, mask, alpha_func, pad)
258 a = alpha_func(n)
259 if lvl == lmax:
--> 260 result[i,j] = d
261 alpha[i,j] = a
262 mask_arr[i,j] = m
TypeError: float() argument must be a string or a number, not 'Node'
The text was updated successfully, but these errors were encountered: