Skip to content

Commit

Permalink
Merge pull request src-d#63 from vmarkovtsev/master
Browse files Browse the repository at this point in the history
Fix the invalid resulting dtype after concatenation
  • Loading branch information
vmarkovtsev authored Oct 21, 2019
2 parents 98f9510 + ad9d79d commit 419f10e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
9 changes: 1 addition & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
1 change: 1 addition & 0 deletions wmd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 419f10e

Please sign in to comment.