Skip to content

Commit 6fa3f3a

Browse files
committed
numpy api fix 1.0.5
1 parent 979befd commit 6fa3f3a

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
Eduponics/__pycache__/*
22
dist/*
3+
micropython_eduponics.egg-info/*

Eduponics/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.4"
1+
__version__ = "1.0.5"

Eduponics/tds.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
import time
2727
from Eduponics import ads1x15
28-
from ulab import *
28+
from ulab import array,numerical
2929
from machine import I2C, Pin
3030
import time
3131

@@ -72,7 +72,7 @@ def read(self):
7272
buffer = [value1,value2]
7373
self.overwrite_buffer(buffer)
7474
# turn the list into numpy array
75-
double_buffer = numpy.array(self.values_buffer)
75+
double_buffer = array(self.values_buffer)
7676
# run median_filter on the numpy array
7777
median_voltage = self.median_filter(double_buffer) * self.vref / 1024.0;
7878
# calculate voltage based on temperature compensation
@@ -85,4 +85,4 @@ def read(self):
8585
return 0
8686

8787
def median_filter(self, data):
88-
return numpy.mean(data)
88+
return numerical.mean(data)

0 commit comments

Comments
 (0)