Commit 07316481 authored by lucasb-eyer's avatar lucasb-eyer
Browse files

Fix unary dimension in README, see #2.

parent a6789c6d
...@@ -53,9 +53,9 @@ You can then set a fixed unary potential in the following way: ...@@ -53,9 +53,9 @@ You can then set a fixed unary potential in the following way:
```python ```python
U = np.array(...) # Get the unary in some way. U = np.array(...) # Get the unary in some way.
print(U.shape) # -> (640, 480, 5) print(U.shape) # -> (5, 640, 480)
print(U.dtype) # -> dtype('float32') print(U.dtype) # -> dtype('float32')
U = U.reshape((-1,5)) # Needs to be flat. U = U.reshape((5,-1)) # Needs to be flat.
d.setUnaryEnergy(U) d.setUnaryEnergy(U)
# Or alternatively: d.setUnary(ConstUnary(U)) # Or alternatively: d.setUnary(ConstUnary(U))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment