From 78f928dfc3c3c35f690351307fbb2154cb12437b Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Sat, 30 Apr 2022 23:00:18 +0800 Subject: [PATCH] Fix typos --- CHANGES.rst | 2 +- audiolazy/lazy_analysis.py | 4 ++-- audiolazy/lazy_core.py | 10 +++++----- audiolazy/lazy_lpc.py | 2 +- audiolazy/lazy_misc.py | 2 +- audiolazy/lazy_poly.py | 2 +- audiolazy/lazy_stream.py | 2 +- audiolazy/lazy_synth.py | 6 +++--- conftest.py | 2 +- docs/conf.py | 6 +++--- examples/formants.py | 2 +- math/lowpass_highpass_bilinear.py | 4 ++-- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 3289549..8b68c2f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -58,7 +58,7 @@ AudioLazy changes history + general: - Tox for testing with CPython 2.7, CPython 3.2~3.6 and PyPy - - Continuous integration wih Travis CI and Coveralls + - Continuous integration with Travis CI and Coveralls - New ``_internals.py`` module to avoid exposing package internals together with the API, which also allowed the new simplified ``__init__.py`` - Renewed setup.py in both its internals (e.g. using AST instead of diff --git a/audiolazy/lazy_analysis.py b/audiolazy/lazy_analysis.py index cc4a31b..3c27fd5 100644 --- a/audiolazy/lazy_analysis.py +++ b/audiolazy/lazy_analysis.py @@ -529,7 +529,7 @@ def maverage(size): Moving average This is the only strategy that uses a ``collections.deque`` object - instead of a ZFilter instance. Fast, but without extra capabilites such + instead of a ZFilter instance. Fast, but without extra capabilities such as a frequency response plotting method. Parameters @@ -875,7 +875,7 @@ def stft(func=None, **kwparams): * Directly as a signal processor builder, wrapping a spectrum block/grain processor function; * Directly as a decorator to a block processor; - * Called without the ``func`` parameter for a partial evalution style + * Called without the ``func`` parameter for a partial evaluation style changing the defaults. See the examples below for more information about these use cases. diff --git a/audiolazy/lazy_core.py b/audiolazy/lazy_core.py index fa66dde..cb36662 100644 --- a/audiolazy/lazy_core.py +++ b/audiolazy/lazy_core.py @@ -37,9 +37,9 @@ class OpMethod(object): """ Internal class to represent an operator method metadata. - You can acess operator methods directly by using the OpMethod.get() class + You can access operator methods directly by using the OpMethod.get() class method, which always returns a generator from a query. - This might be helpful if you need to acess the operator module from + This might be helpful if you need to access the operator module from symbols. Given an instance "op", it has the following data: ========= =========================================================== @@ -221,7 +221,7 @@ class AbstractOperatorOverloaderMeta(ABCMeta): """ Abstract metaclass for classes with massively overloaded operators. - Dunders dont't appear within "getattr" nor "getattribute", and they should + Dunders don't appear within "getattr" nor "getattribute", and they should be inside the class dictionary, not the class instance one, otherwise they won't be found by the usual mechanism. That's why we have to be eager here. You need a concrete class inherited from this one, and the "abstract" @@ -231,7 +231,7 @@ class AbstractOperatorOverloaderMeta(ABCMeta): query inputs, see that method docstring for more information and examples. Its a good idea to tell all operators that will be used, including the ones that should be defined in the instance namespace, since the - metaclass will enforce their existance without overwriting. + metaclass will enforce their existence without overwriting. These should be overridden by a string or a list with all operator names, symbols or operator functions (from the `operator` module) to be @@ -295,7 +295,7 @@ def __new__(mcls, name, bases, namespace): return cls # The 3 methods below should be overloaded, but they shouldn't be - # "abstractmethod" since it's unuseful (and perhaps undesirable) + # "abstractmethod" since it's useless (and perhaps undesirable) # when there could be only one type of operator being massively overloaded. def __binary__(cls, op): """ diff --git a/audiolazy/lazy_lpc.py b/audiolazy/lazy_lpc.py index 2aead24..54ea6e4 100644 --- a/audiolazy/lazy_lpc.py +++ b/audiolazy/lazy_lpc.py @@ -59,7 +59,7 @@ def levinson_durbin(acdata, order=None): R . a = r - where :math:`R` is a simmetric Toeplitz matrix where each element are lags + where :math:`R` is a symmetric Toeplitz matrix where each element are lags from the given autocorrelation list. :math:`R` and :math:`r` are defined (Python indexing starts with zero and slices don't include the last element): diff --git a/audiolazy/lazy_misc.py b/audiolazy/lazy_misc.py index aeb0374..468d005 100644 --- a/audiolazy/lazy_misc.py +++ b/audiolazy/lazy_misc.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . """ -Common miscellanous tools and constants for general use +Common miscellaneous tools and constants for general use """ from collections import deque diff --git a/audiolazy/lazy_poly.py b/audiolazy/lazy_poly.py index 322cd7a..4ee2fb2 100644 --- a/audiolazy/lazy_poly.py +++ b/audiolazy/lazy_poly.py @@ -568,7 +568,7 @@ def resample(sig, old=1, new=1, order=3, zero=0.): Hint ---- The time step can also be time-varying, although that's certainly difficult - to synchonize (one sample is needed for each output sample). Perhaps the + to synchronize (one sample is needed for each output sample). Perhaps the best approach for this case would be a ControlStream keeping the desired value at any time. diff --git a/audiolazy/lazy_stream.py b/audiolazy/lazy_stream.py index 616f375..c27b5b4 100644 --- a/audiolazy/lazy_stream.py +++ b/audiolazy/lazy_stream.py @@ -129,7 +129,7 @@ class Stream(meta(Iterable, metaclass=StreamMeta)): In that example, after declaring z as function of x and y, you should not use x and y anymore. Use the thub() or the tee() functions, or perhaps the x.tee() or x.copy() Stream methods instead, if you need - to use x again otherwhere. + to use x again elsewhere. """ __ignored_classes__ = tuple() diff --git a/audiolazy/lazy_synth.py b/audiolazy/lazy_synth.py index 9ffeb98..8676b64 100644 --- a/audiolazy/lazy_synth.py +++ b/audiolazy/lazy_synth.py @@ -43,7 +43,7 @@ def modulo_counter(start=0., modulo=256., step=1.): Creates a lazy endless counter stream with the given modulo, i.e., its values ranges from 0. to the given "modulo", somewhat equivalent to:\n Stream(itertools.count(start, step)) % modulo\n - Yet the given step can be an iterable, and doen't create unneeded big + Yet the given step can be an iterable, and doesn't create unneeded big ints. All inputs can be float. Input order remembers slice/range inputs. All inputs can also be iterables. If any of them is an iterable, the end of this counter happen when there's no more data in one of those inputs. @@ -154,7 +154,7 @@ def line(dur, begin=0., end=1., finish=False): respectively. finish : Choose if ``end`` it the last to be yielded or it shouldn't be yield at - all. Defauts to False, which means that ``end`` won't be yield. The last + all. Defaults to False, which means that ``end`` won't be yield. The last sample won't have "end" amplitude unless finish is True, i.e., without explicitly saying "finish=True", the "end" input works like a "stop" range parameter, although it can [should] be a float. This is so to help @@ -167,7 +167,7 @@ def line(dur, begin=0., end=1., finish=False): Examples -------- With ``finish = True``, it works just like NumPy ``np.linspace``, besides - argument order and lazyness: + argument order and laziness: >>> import numpy as np # This test needs Numpy >>> np.linspace(.2, .7, 6) diff --git a/conftest.py b/conftest.py index f522f98..2b5f557 100644 --- a/conftest.py +++ b/conftest.py @@ -41,7 +41,7 @@ def find(self, obj, name=None, module=None, **kwargs): for name, attr in vars(obj).items(): # We know it's a module if isinstance(attr, StrategyDict): for st in attr: # Each strategy can have a doctest - if st.__module__ == module_name: # Avoid stuff from otherwhere + if st.__module__ == module_name: # Avoid stuff from elsewhere sname = ".".join([module_name, name, st.__name__]) tests.extend(old_find(self, st, name=sname, module=obj, **kwargs)) tests.sort() diff --git a/docs/conf.py b/docs/conf.py index f022b42..24e19cb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -198,7 +198,7 @@ def pre_processor(app, what, name, obj, options, lines, else: result.append(" " + el) - else: # Unkown block name, perhaps the starting one (empty) + else: # Unknown block name, perhaps the starting one (empty) result.extend(blk) # Skip a line after each block @@ -309,7 +309,7 @@ def newest_file(file_iterable): release = version # Get "today" using the last file modification date -# WARNING: Be careful with git clone, clonning date will be "today" +# WARNING: Be careful with git clone, cloning date will be "today" install_path = audiolazy.__path__[0] installed_nfile = newest_file(file_name_generator_recursive(install_path)) installed_time = os.path.getmtime(installed_nfile) @@ -366,7 +366,7 @@ def newest_file(file_iterable): author, project, # Dir menu entry description, # From README.rst - "Miscellanous", # Category + "Miscellaneous", # Category )] diff --git a/examples/formants.py b/examples/formants.py index bd91e20..3a56636 100755 --- a/examples/formants.py +++ b/examples/formants.py @@ -86,5 +86,5 @@ gain.value = 0 sleep(inertia_dur / s + .2) # Divide by s because here it's already # expecting a value in seconds, and we don't - # want ot give a value in a time-squaed unit + # want to give a value in a time-squaed unit # like s ** 2 diff --git a/math/lowpass_highpass_bilinear.py b/math/lowpass_highpass_bilinear.py index 02dd640..a240a0a 100644 --- a/math/lowpass_highpass_bilinear.py +++ b/math/lowpass_highpass_bilinear.py @@ -34,8 +34,8 @@ def print_header(msg): def taylor(f, n=2, **kwargs): """ - Taylor/Mclaurin polynomial aproximation for the given function. - The ``n`` (default 2) is the amount of aproximation terms for ``f``. Other + Taylor/Mclaurin polynomial approximation for the given function. + The ``n`` (default 2) is the amount of approximation terms for ``f``. Other arguments are keyword-only and will be passed to the ``f.series`` method. """ return sum(Stream(f.series(n=None, **kwargs)).limit(n))