Skip to content

Commit

Permalink
Updated to return the correct items from numpy
Browse files Browse the repository at this point in the history
Updated version for pre-release
  • Loading branch information
rowleya committed Mar 19, 2015
1 parent dba4acf commit 9a658cd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pacman/model/routing_info/key_and_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,5 @@ def get_keys(self, key_array=None, offset=0, n_keys=None):
.view(dtype="uint8"))[-len(zeros):]
key[zeros] = unwrapped_value
key_array[value + offset] = \
numpy.packbits(key).view(dtype=">u4")[0]
numpy.packbits(key).view(dtype=">u4")[0].item()
return key_array, n_keys
2 changes: 1 addition & 1 deletion pacman/model/routing_info/subedge_routing_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get_keys(self, n_keys=None):
for key_and_mask in self._keys_and_masks:
n_keys += key_and_mask.n_keys

key_array = numpy.zeros(n_keys, dtype="<u4")
key_array = numpy.zeros(n_keys, dtype=">u4")
offset = 0
for key_and_mask in self._keys_and_masks:
_, offset = key_and_mask.get_keys(
Expand Down
2 changes: 1 addition & 1 deletion pacman/utilities/utility_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def compress_from_bit_array(bit_array):
:type bit_array: [uint8]
:rtype: int
"""
return numpy.packbits(bit_array).view(dtype=">u4")[0]
return numpy.packbits(bit_array).view(dtype=">u4")[0].item()


def compress_bits_from_bit_array(bit_array, bit_positions):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="SpiNNaker_PACMAN",
version="2015.003-alpha-02",
version="2015.003-alpha-03",
description="Partition and Configuration Manager",
url="https://github.com/SpiNNakerManchester/PACMAN",
license="GNU GPLv3.0",
Expand Down

0 comments on commit 9a658cd

Please sign in to comment.