lucasb-eyer / pydensecrf

Python wrapper to Philipp Krähenbühl's dense (fully connected) CRFs with gaussian edge potentials.
MIT License
1.94k stars 416 forks source link

ValueError: ndarray is not C-contiguous #66

Closed mokii closed 6 years ago

mokii commented 6 years ago

error: File "stringsource", line 345, in View.MemoryView.memoryview.cinit (pydensecrf/densecrf.cpp:7881) ValueError: ndarray is not C-contiguous I use the 2D softmax_to_unary, but get the above error, what is the problem?

reynoldscem commented 6 years ago

Use numpy.ascontiguousarray

lucasb-eyer commented 6 years ago

Thanks @reynoldscem, that is correct.