Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
joelgrus committed Jun 16, 2019
2 parents 200475d + 3425540 commit 0c2442e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ If you are on Windows, it's [potentially more complicated](https://stackoverflow
4. [Linear Algebra](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/linear_algebra.py)
5. [Statistics](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/statistics.py)
6. [Probability](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/probability.py)
7. [Hypothesis and Inference](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/hypothesis_and_inference.py)
7. [Hypothesis and Inference](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/inference.py)
8. [Gradient Descent](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/gradient_descent.py)
9. [Getting Data](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/getting_data.py)
10. [Working With Data](https://github.com/joelgrus/data-science-from-scratch/blob/master/scratch/working_with_data.py)
Expand Down
5 changes: 2 additions & 3 deletions scratch/crash_course_in_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,12 +714,12 @@ def ugly_function(value: int, operation: Union[str, int, float, bool]) -> int:
...

def total(xs: list) -> float:
return sum(total)
return sum(xs)

from typing import List # note capital L

def total(xs: List[float]) -> float:
return sum(total)
return sum(xs)

# This is how to type-annotate variables when you define them.
# But this is unnecessary; it's "obvious" x is an int.
Expand Down Expand Up @@ -769,4 +769,3 @@ def comma_repeater(s: str, n: int) -> str:

def total(xs: Numbers) -> Number:
return sum(xs)

0 comments on commit 0c2442e

Please sign in to comment.