diff --git a/README.md b/README.md index 2df58f4..0f60a76 100644 --- a/README.md +++ b/README.md @@ -65,8 +65,8 @@ Now we can call `exact_cover`: >>> import numpy as np >>> import exact_cover as ec >>> S = np.array([[1,0,0,1,0],[1,1,1,0,0],[0,1,1,0,0],[0,0,0,0,1]], dtype=bool) - >>> ec.get_exact_cover(S) - array([0, 2, 3]) + >>> print(ec.get_exact_cover(S)) + [0 2 3] This is telling us that the 0th row (i.e. A), the 2nd row (i.e. C), and the 3rd row (i.e. D) together form an exact cover. diff --git a/examples.md b/examples.md index 2cb04c3..453c044 100644 --- a/examples.md +++ b/examples.md @@ -10,11 +10,11 @@ Input and output to the package are using the numpy array type: This example is explained in README.md >>> S = np.array([[1,0,0,1,0],[1,1,1,0,0],[0,1,1,0,0],[0,0,0,0,1]], dtype=np.int32) - >>> ec.get_exact_cover(S) - array([0, 2, 3]) + >>> print(ec.get_exact_cover(S)) + [0 2 3] The numpy type to use is defined in the package for convenience and compatibility: >>> from exact_cover.io import DTYPE_FOR_ARRAY >>> T = np.array([[1,0,0,1,0],[1,1,1,0,0],[0,1,1,0,0],[0,0,0,0,1]], dtype=DTYPE_FOR_ARRAY) - >>> ec.get_exact_cover(T) - array([0, 2, 3]) + >>> print(ec.get_exact_cover(T)) + [0 2 3]