Use integers instead of floats for arrays returned from scheduler.array#94
Use integers instead of floats for arrays returned from scheduler.array#94meatballs merged 6 commits intoPyconUK:masterfrom alexwlchan:arrays-should-be-ints
Conversation
|
We seem to have a problem on appveyor here. Not sure why.... |
Is this perhaps a clue? http://stackoverflow.com/questions/36278590/numpy-array-dtype-is-coming-as-int32-by-default-in-a-windows-10-64-bit-machine |
|
At a total guess, numpy is picking a slightly different int type on Windows? |
|
Would setting the type to be |
Not sure. Either way, it was probably a mistake of me to be inconsistent in the first place. Let's give it a go! |
Appveyor seems happy! 👍 |
|
using |
I will freely admit I’m not a numpy expert. If you use |
|
I believe that in Python 3, |
|
We don't want the array str to actually have |
For completeness: >>> import numpy as np
>>> a = np.zeros((3, 3), dtype=np.bool)
>>> a[0, 1] = 1
>>> a[2, 1] = 1
>>> a
array([[False, True, False],
[False, False, False],
[False, True, False]], dtype=bool)
>>> b = np.zeros((3, 3), dtype=np.int8)
>>> b[0, 1] = 1
>>> b[2, 1] = 1
>>> b
array([[0, 1, 0],
[0, 0, 0],
[0, 1, 0]], dtype=int8)My preference would be |
|
Ah well. Bool would have been nice but we really do need to see actual integers! Int8 for me too. |
|
Simple doctest failure in |
|
Tests seemed to have passed, just waiting for coveralls. 😕 |
I've tried running coverage locally but get: (This isn't happening on travis, we're definitely waiting on coveralls there). |
DUH! And here's the coverage report from travis: I think this is good to go! |
Resolves #91.