-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
import numpy as np | ||
|
||
def add(x, y): | ||
"""This is an add function""" | ||
return x + y | ||
|
||
def numpy_add(x, y): | ||
return x + y | ||
|
||
|
||
print(add(1, 1)) | ||
|
||
print(add(2, 1)) | ||
print(add(2, 1)) | ||
|
||
print(numpy_add(np.arange(4), np.arange(4))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
from hello import add | ||
import numpy as np | ||
from hello import add, numpy_add | ||
|
||
|
||
def test_add(): | ||
assert 2 == add(1, 1) | ||
|
||
def test_numpy_add(): | ||
assert 1 == 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ pandas | |
pytest | ||
pytest-cov | ||
pylint | ||
numpy |