Mercurial > hg > tvii
annotate tests/test_broadcasting.py @ 14:ec5f97abf8ed
stub np broadcasting test
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 03 Sep 2017 12:07:49 -0700 |
parents | |
children | 926c127305fa |
rev | line source |
---|---|
14 | 1 #!/usr/bin/env python |
2 | |
3 """ | |
4 illustration of numpy broadcasting | |
5 """ | |
6 | |
7 import os | |
8 import unittest | |
9 import numpy as np | |
10 | |
11 #apples, beef, eggs, potatos | |
12 calories = [[56., 0.0, 4.4, 68.], # carbs | |
13 [1.2, 104., 52., 8.], # protein | |
14 [1.8, 135., 99., 0.9]] # fat | |
15 | |
16 class TestBroadcasting(unittest.TestCase): | |
17 def test_basic(self): | |
18 """example of braodcasting""" | |
19 | |
20 if __name__ == '__main__': | |
21 unittest.main() |