Skip to content

Commit b313604

Browse files
authored
Merge pull request #240 from dimitri-yatsenko/master
bugfix in reading fields of type double.
2 parents d6625ab + 0b4774d commit b313604

5 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@
2727
* `insert(..., skip_duplicates=True)` now relies on `SELECT IGNORE`. Previously it explicitly checked if tuple already exists.
2828
* table previews now include blob attributes displaying the string <BLOB>
2929

30+
### 0.3.8 -- August 2, 2016
31+
* added the `_update` method in `base_relation`. It allows updating values in existing tuples.
32+
* bugfix in reading values of type double. Previously it was cast as float32.
33+

‎datajoint/__init__.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import os
1717

1818
__author__ = "Dimitri Yatsenko, Edgar Walker, and Fabian Sinz at Baylor College of Medicine"
19-
__version__ = "0.3.7"
20-
__date__ = "July 31, 2016"
19+
__version__ = "0.3.8"
20+
__date__ = "August 2, 2016"
2121
__all__ = ['__author__', '__version__',
2222
'config', 'conn', 'kill', 'BaseRelation',
2323
'Connection', 'Heading', 'FreeRelation', 'Not', 'schema',

‎datajoint/heading.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def init_from_database(self, conn, database, table_name):
154154
numeric_types = {
155155
('float', False): np.float32,
156156
('float', True): np.float32,
157-
('double', False): np.float32,
157+
('double', False): np.float64,
158158
('double', True): np.float64,
159159
('tinyint', False): np.int8,
160160
('tinyint', True): np.uint8,

‎datajoint/relational_operand.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ def __init__(self, arg=None):
8787
self._distinct = arg.distinct
8888

8989
@classmethod
90-
def create(cls):
90+
def create(cls): # pragma: no cover
9191
"""abstract method for creating an instance"""
9292
assert False, "Abstract method `create` must be overridden in subclass."
9393

9494
@property
95-
def select_fields(self):
95+
def select_fields(self): # pragma: no cover
9696
"""abstract property: a string specifying the field list in SQL queries"""
9797
assert False, "Abstract property `select_fields` must be overridden in subclass."
9898

‎datajoint/schema.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def spawn_missing_classes(self):
8080
try:
8181
master_class = self.context[to_camel_case(groups['master'])]
8282
except KeyError:
83-
raise DataJointError('The tabled %s does not follow DataJoint naming conventions' % table_name)
83+
raise DataJointError('The table %s does not follow DataJoint naming conventions' % table_name)
8484
part_class = type(class_name, (Part,), dict(definition=...))
8585
part_class._master = master_class
8686
self.process_relation_class(part_class, context=self.context, assert_declared=True)

0 commit comments

Comments
 (0)