Commit 5ee82b1
add test for hour_angle, vectorize (#599)
* add test for hour_angle, vectorize
* closes #598 vectorize to make it more efficient
* closes #597 add test
Signed-off-by: Mark Mikofski <bwana.marko@yahoo.com>
* BUG: use np.int64 works better for older numpy version than python int
* also converting times to int before subtracting works better for older
pandas versions which were not calculating the timedeltas correctly
* remove comment with missing space after hash, add FIXME that explains
why the expected values are slightly different than the SPA calculator
output
* fix hanging indent
* BUG: replace utcoffset() with reliable, efficient approach ...
* ... suggested by @wholmgren (thx!)
* utcoffset() is unpredictable when used with pandas datetime indices
* only predictable with Python datetime objects or pandas Timestamps
* instead replace tzinfo with None to get naive local times, and
calculate difference from tz-aware times to get timezones
* BUG: combine arithmetic to make calculation more efficient
* also use asarray wrapper at return to ensure consistency
* add comments to explain to future maintainers
* stickler
* remove try-except, doesn't work anyway, wait for pandas >=0.15.01 parent 0c245a9 commit 5ee82b1
2 files changed
+32
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1327 | 1327 | | |
1328 | 1328 | | |
1329 | 1329 | | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
0 commit comments