From 4f84f7d14eeaf212c7bd30bf526b21e2f7792b21 Mon Sep 17 00:00:00 2001 From: Vadim Markovtsev Date: Mon, 21 Oct 2019 14:11:55 +0200 Subject: [PATCH 1/2] Fix #62 Signed-off-by: Vadim Markovtsev --- setup.py | 4 ++-- wmd/__init__.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 2e63c64..8d83110 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ description="Accelerated functions to calculate Word Mover's Distance", long_description=long_description, long_description_content_type="text/markdown", - version="1.3.1", + version="1.3.2", license="Apache Software License", author="source{d}", author_email="vadim@sourced.tech", @@ -52,7 +52,7 @@ setup_requires=["numpy"], # does not really help - we need it to get_include() install_requires=["numpy"], classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX :: Linux", diff --git a/wmd/__init__.py b/wmd/__init__.py index edd3d0e..21606a2 100644 --- a/wmd/__init__.py +++ b/wmd/__init__.py @@ -382,6 +382,7 @@ def _get_vocabulary(self, index): def _common_vocabulary_batch(self, words1, weights1, i2): words2, weights2 = self._get_vocabulary(i2) + words1 = numpy.asarray(words1).astype(words2.dtype) joint, index = numpy.unique(numpy.concatenate((words1, words2)), return_index=True) nw1 = numpy.zeros(len(joint), dtype=numpy.float32) From ad9d79dd973b954c6a6e645e3425c8f7985c6de0 Mon Sep 17 00:00:00 2001 From: Vadim Markovtsev Date: Mon, 21 Oct 2019 14:15:13 +0200 Subject: [PATCH 2/2] Refresh the CI Signed-off-by: Vadim Markovtsev --- .travis.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5b57185..454e155 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,15 @@ language: python cache: pip +dist: bionic linux_before_install: &linux_before_install - pip3 install --upgrade pip matrix: include: - language: generic os: osx - - python: 3.4 - dist: trusty - before_install: *linux_before_install - - python: 3.5 - dist: xenial - before_install: *linux_before_install - python: 3.6 - dist: xenial before_install: *linux_before_install - python: 3.7 - dist: xenial before_install: *linux_before_install install: - pip3 install numpy scipy pycodestyle codecov