Skip to content

Commit dbbe4f0

Browse files
committed
remove support for PDL::Complex entirely
1 parent caa17f8 commit dbbe4f0

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

Changes

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- remove support for PDL::Complex entirely
2+
13
0.19 2024-02-24
24
- fix test to not broadcast over output
35

FFTW3_header_include.pm

+2-4
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ EOF
8989
$internal_function .= "fft$rank";
9090
eval { no strict 'refs'; $internal_function->( $in, $out, $plan ) };
9191
barf $@ if $@;
92-
93-
($in->isa('PDL::Complex') && !($do_inverse_fft && $is_real_fft))
94-
? $out->complex : $out;
92+
$out;
9593
}
9694

9795
sub getOutArgs {
@@ -147,7 +145,7 @@ EOF
147145
my $type = ref $arg;
148146
$type = 'scalar' unless defined $arg;
149147
barf <<EOF unless ref $arg && $arg->isa('PDL');
150-
$thisfunction arguments must be of type 'PDL' (including 'PDL::Complex').
148+
$thisfunction arguments must be of type 'PDL'.
151149
Instead I got an arg of type '$type'. Giving up.
152150
EOF
153151
}

README.pod

+3-12
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ PDL::FFTW3 - PDL interface to the Fastest Fourier Transform in the West v3
77
use PDL;
88
use PDL::FFTW3;
99
use PDL::Graphics::Gnuplot;
10-
use PDL::Complex;
1110

1211
# Basic functionality
1312
my $x = sin( sequence(100) * 2.0 ) + 2.0 * cos( sequence(100) / 3.0 );
@@ -138,17 +137,9 @@ a single-precision floating point transform (and return data of that type).
138137

139138
fft1( $x->byte )
140139

141-
This module expects complex numbers to be stored as a (real,imag) pair in the
142-
first dimension of an ndarray. Thus in a complex ndarray C<$x>, it is expected that
143-
C<$x-E<gt>dim(0) == 2> (this module verifies this before proceeding).
144-
As of 0.10, it works to pass in a L<PDL::Complex> object, though the
145-
output will still currently be a similarly-shaped "real" L<PDL>
146-
object with the initial dimension of 2. This is intended to be changed
147-
so the output type is the same as the input.
148-
149-
As of version 0.11, you can also pass in ndarrays with the new "native
150-
complex" types (C<cfloat>, C<cdouble>), without the initial dimension of
151-
2. Outputs will also be native complex.
140+
As of 0.20, this module expects complex numbers to be stored as "native
141+
complex" types (C<cfloat>, C<cdouble>). Outputs will also be native
142+
complex.
152143

153144
Generally, the sizes of the input and the output must match. This is completely
154145
true for the complex <-> complex transforms: the output will have the same size

0 commit comments

Comments
 (0)