Skip to content

Commit

Permalink
Preparing version 0.7.1 to dev (#264)
Browse files Browse the repository at this point in the history
* Release 0.7.1

* Fix flake8 errors
  • Loading branch information
vuolleko committed Apr 12, 2018
1 parent 3bf2b53 commit 79c7e9c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Changelog
=========

dev
---
0.7.1 (2018-04-11)
------------------
- Implemented model selection (elfi.compare_models). See API documentation.
- Fix threshold=0 in rejection sampling
- Set default batch_size to 1 in ParameterInference base class

0.7 (2017-11-30)
----------------
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**Version 0.7 released!** See the CHANGELOG and [notebooks](https://github.com/elfi-dev/notebooks).
**Version 0.7.1 released!** See the CHANGELOG and [notebooks](https://github.com/elfi-dev/notebooks).

**NOTE:** For the time being NetworkX 2 is incompatible with ELFI.

Expand Down
2 changes: 1 addition & 1 deletion elfi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
__email__ = 'elfi-support@hiit.fi'

# make sure __version_ is on the last non-empty line (read by setup.py)
__version__ = '0.7_dev'
__version__ = '0.7.1'
6 changes: 3 additions & 3 deletions elfi/model/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def run_vectorized(operation, *inputs, constants=None, dtype=None, batch_size=No

# Test if a numpy array
if is_array(inpt):
l = len(inpt)
length = len(inpt)
if batch_size is None:
batch_size = l
elif batch_size != l:
batch_size = length
elif batch_size != length:
raise ValueError('Batch size {} does not match with input {} length of '
'{}. Please check `constants` argument for the '
'vectorize decorator for marking constant inputs.')
Expand Down
6 changes: 3 additions & 3 deletions elfi/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,12 @@ def _make_store_for(self, node):

def __len__(self):
"""Return the largest batch index in any of the stores."""
l = 0
largest = 0
for output, store in self.stores.items():
if store is None:
continue
l = max(l, len(store))
return l
largest = max(largest, len(store))
return largest

def __getitem__(self, batch_index):
"""Return the batch."""
Expand Down

0 comments on commit 79c7e9c

Please sign in to comment.