Skip to content

Commit 4256bc2

Browse files
committed
Remove numpy
1 parent 6b8fbd6 commit 4256bc2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

strsimpy/longest_common_subsequence.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919
# SOFTWARE.
2020

21-
import numpy as np
22-
2321
from .string_distance import StringDistance
2422

2523

@@ -42,7 +40,7 @@ def length(s0, s1):
4240
s0_len, s1_len = len(s0), len(s1)
4341
x, y = s0[:], s1[:]
4442
n, m = s0_len + 1, s1_len + 1
45-
matrix = np.zeros((n, m))
43+
matrix = [[0] * m for _ in range(n)]
4644
for i in range(1, s0_len + 1):
4745
for j in range(1, s1_len + 1):
4846
if x[i - 1] == y[j - 1]:

0 commit comments

Comments
 (0)