Skip to content

Commit

Permalink
piddle -> ndarray
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Sep 15, 2024
1 parent b57f2dd commit 9d40f04
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PDL::DSP::Windows - Window functions for signal processing
use PDL;
use PDL::DSP::Windows 'window';

# Get a piddle with a window's samples with the helper
# Get an ndarray with a window's samples with the helper
my $samples = window( 10, tukey => { params => .5 });

# Or construct a window object with the same parameters
Expand Down Expand Up @@ -162,7 +162,7 @@ For example:

$win->samples;

Generate and return a reference to the piddle of `$N` samples for the window
Generate and return a reference to the ndarray of `$N` samples for the window
`$win`. This is the real-space representation of the window.

The samples are stored in the object `$win`, but are regenerated every time
Expand All @@ -177,7 +177,7 @@ For example:

$win->modfreqs;

Generate and return a reference to the piddle of the modulus of the fourier
Generate and return a reference to the ndarray of the modulus of the fourier
transform of the samples for the window `$win`.

These values are stored in the object `$win`, but are regenerated every time
Expand All @@ -188,7 +188,7 @@ These values are stored in the object `$win`, but are regenerated every time
- min\_bins => MIN

This sets the minimum number of frequency bins. Defaults to 1000. If necessary,
the piddle of window samples are padded with zeroes before the fourier transform
the ndarray of window samples are padded with zeroes before the fourier transform
is performed.

## get
Expand Down
8 changes: 4 additions & 4 deletions lib/PDL/DSP/Windows.pm
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ PDL::DSP::Windows - Window functions for signal processing
use PDL;
use PDL::DSP::Windows 'window';
# Get a piddle with a window's samples with the helper
# Get an ndarray with a window's samples with the helper
my $samples = window( 10, tukey => { params => .5 });
# Or construct a window object with the same parameters
Expand Down Expand Up @@ -452,7 +452,7 @@ sub init {
=for ref
Generate and return a reference to the piddle of C<$N> samples for the window
Generate and return a reference to the ndarray of C<$N> samples for the window
C<$win>. This is the real-space representation of the window.
The samples are stored in the object C<$win>, but are regenerated every time
Expand Down Expand Up @@ -481,7 +481,7 @@ sub samples {
=for ref
Generate and return a reference to the piddle of the modulus of the fourier
Generate and return a reference to the ndarray of the modulus of the fourier
transform of the samples for the window C<$win>.
These values are stored in the object C<$win>, but are regenerated every time
Expand All @@ -494,7 +494,7 @@ C<modfreqs> is invoked. See the method L</get_modfreqs> below.
=item min_bins => MIN
This sets the minimum number of frequency bins. Defaults to 1000. If necessary,
the piddle of window samples are padded with zeroes before the fourier transform
the ndarray of window samples are padded with zeroes before the fourier transform
is performed.
=back
Expand Down
2 changes: 1 addition & 1 deletion t/helpers.t
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use MyTest::Helper qw( dies is_approx );
subtest 'chebpoly.' => sub {
is_approx chebpoly( 3, pdl( [ 0.5, 1, 1.2 ] ) ),
[ -1, 1, 3.312 ],
'chebpoly takes piddle';
'chebpoly takes ndarray';

is_approx chebpoly( 3, [ 0.5, 1, 1.2 ] ),
[ -1, 1, 3.312 ],
Expand Down
4 changes: 2 additions & 2 deletions t/oo.t
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ subtest 'Samples accesors' => sub {
'->samples redefines value';

is ref $window->get_samples, 'PDL',
'->get_samples does not die if samples is already a piddle';
'->get_samples does not die if samples is already an ndarray';
};

subtest 'Modfreqs accesors' => sub {
Expand Down Expand Up @@ -185,7 +185,7 @@ subtest 'Modfreqs accesors' => sub {
}

is ref $window->get_modfreqs, 'PDL',
'->get_modfreqs does not die if modfreqs is already a piddle';
'->get_modfreqs does not die if modfreqs is already an ndarray';

{
$window->{modfreqs} = [];
Expand Down

0 comments on commit 9d40f04

Please sign in to comment.