forked from SciSharp/Numpy.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNumPy.fft.gen.cs
More file actions
674 lines (659 loc) · 27.5 KB
/
NumPy.fft.gen.cs
File metadata and controls
674 lines (659 loc) · 27.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
// Copyright (c) 2019 by the SciSharp Team
// Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using Python.Runtime;
using Numpy.Models;
using Python.Included;
namespace Numpy
{
public partial class NumPy
{
/// <summary>
/// Compute the one-dimensional discrete Fourier Transform for real input.<br></br>
///
/// This function computes the one-dimensional n-point discrete Fourier
/// Transform (DFT) of a real-valued array by means of an efficient algorithm
/// called the Fast Fourier Transform (FFT).<br></br>
///
/// Notes
///
/// When the DFT is computed for purely real input, the output is
/// Hermitian-symmetric, i.e.<br></br>
/// the negative frequency terms are just the complex
/// conjugates of the corresponding positive-frequency terms, and the
/// negative-frequency terms are therefore redundant.<br></br>
/// This function does not
/// compute the negative frequency terms, and the length of the transformed
/// axis of the output is therefore n//2 + 1.<br></br>
///
/// When A = rfft(a) and fs is the sampling frequency, A[0] contains
/// the zero-frequency term 0*fs, which is real due to Hermitian symmetry.<br></br>
///
/// If n is even, A[-1] contains the term representing both positive
/// and negative Nyquist frequency (+fs/2 and -fs/2), and must also be purely
/// real.<br></br>
/// If n is odd, there is no term at fs/2; A[-1] contains
/// the largest positive frequency (fs/2*(n-1)/n), and is complex in the
/// general case.<br></br>
///
/// If the input a contains an imaginary part, it is silently discarded.
/// </summary>
/// <param name="a">
/// Input array
/// </param>
/// <param name="n">
/// Number of points along transformation axis in the input to use.<br></br>
///
/// If n is smaller than the length of the input, the input is cropped.<br></br>
///
/// If it is larger, the input is padded with zeros.<br></br>
/// If n is not given,
/// the length of the input along the axis specified by axis is used.
/// </param>
/// <param name="axis">
/// Axis over which to compute the FFT.<br></br>
/// If not given, the last axis is
/// used.
/// </param>
/// <param name="norm">
/// Normalization mode (see numpy.fft).<br></br>
/// Default is None.
/// </param>
/// <returns>
/// The truncated or zero-padded input, transformed along the axis
/// indicated by axis, or the last one if axis is not specified.<br></br>
///
/// If n is even, the length of the transformed axis is (n/2)+1.
/// If n is odd, the length is (n+1)/2.
/// </returns>
public NDarray fft_rfft(NDarray a, int? n = null, int? axis = -1, string norm = null)
{
//auto-generated code, do not change
var fft = self.GetAttr("fft");
var __self__=fft;
var pyargs=ToTuple(new object[]
{
a,
});
var kwargs=new PyDict();
if (n!=null) kwargs["n"]=ToPython(n);
if (axis!=-1) kwargs["axis"]=ToPython(axis);
if (norm!=null) kwargs["norm"]=ToPython(norm);
dynamic py = __self__.InvokeMethod("rfft", pyargs, kwargs);
return ToCsharp<NDarray>(py);
}
/// <summary>
/// Compute the inverse of the n-point DFT for real input.<br></br>
///
/// This function computes the inverse of the one-dimensional n-point
/// discrete Fourier Transform of real input computed by rfft.<br></br>
///
/// In other words, irfft(rfft(a), len(a)) == a to within numerical
/// accuracy.<br></br>
/// (See Notes below for why len(a) is necessary here.)
///
/// The input is expected to be in the form returned by rfft, i.e.<br></br>
/// the
/// real zero-frequency term followed by the complex positive frequency terms
/// in order of increasing frequency.<br></br>
/// Since the discrete Fourier Transform of
/// real input is Hermitian-symmetric, the negative frequency terms are taken
/// to be the complex conjugates of the corresponding positive frequency terms.<br></br>
///
/// Notes
///
/// Returns the real valued n-point inverse discrete Fourier transform
/// of a, where a contains the non-negative frequency terms of a
/// Hermitian-symmetric sequence.<br></br>
/// n is the length of the result, not the
/// input.<br></br>
///
/// If you specify an n such that a must be zero-padded or truncated, the
/// extra/removed values will be added/removed at high frequencies.<br></br>
/// One can
/// thus resample a series to m points via Fourier interpolation by:
/// a_resamp = irfft(rfft(a), m).
/// </summary>
/// <param name="a">
/// The input array.
/// </param>
/// <param name="n">
/// Length of the transformed axis of the output.<br></br>
///
/// For n output points, n//2+1 input points are necessary.<br></br>
/// If the
/// input is longer than this, it is cropped.<br></br>
/// If it is shorter than this,
/// it is padded with zeros.<br></br>
/// If n is not given, it is determined from
/// the length of the input along the axis specified by axis.
/// </param>
/// <param name="axis">
/// Axis over which to compute the inverse FFT.<br></br>
/// If not given, the last
/// axis is used.
/// </param>
/// <param name="norm">
/// Normalization mode (see numpy.fft).<br></br>
/// Default is None.
/// </param>
/// <returns>
/// The truncated or zero-padded input, transformed along the axis
/// indicated by axis, or the last one if axis is not specified.<br></br>
///
/// The length of the transformed axis is n, or, if n is not given,
/// 2*(m-1) where m is the length of the transformed axis of the
/// input.<br></br>
/// To get an odd number of output points, n must be specified.
/// </returns>
public NDarray fft_irfft(NDarray a, int? n = null, int? axis = -1, string norm = null)
{
//auto-generated code, do not change
var fft = self.GetAttr("fft");
var __self__=fft;
var pyargs=ToTuple(new object[]
{
a,
});
var kwargs=new PyDict();
if (n!=null) kwargs["n"]=ToPython(n);
if (axis!=-1) kwargs["axis"]=ToPython(axis);
if (norm!=null) kwargs["norm"]=ToPython(norm);
dynamic py = __self__.InvokeMethod("irfft", pyargs, kwargs);
return ToCsharp<NDarray>(py);
}
/// <summary>
/// Compute the 2-dimensional FFT of a real array.<br></br>
///
/// Notes
///
/// This is really just rfftn with different default behavior.<br></br>
///
/// For more details see rfftn.
/// </summary>
/// <param name="a">
/// Input array, taken to be real.
/// </param>
/// <param name="s">
/// Shape of the FFT.
/// </param>
/// <param name="axes">
/// Axes over which to compute the FFT.
/// </param>
/// <param name="norm">
/// Normalization mode (see numpy.fft).<br></br>
/// Default is None.
/// </param>
/// <returns>
/// The result of the real 2-D FFT.
/// </returns>
public NDarray fft_rfft2(NDarray a, int[] s = null, int[] axes = null, string norm = null)
{
//auto-generated code, do not change
var fft = self.GetAttr("fft");
var __self__=fft;
var pyargs=ToTuple(new object[]
{
a,
});
var kwargs=new PyDict();
if (s!=null) kwargs["s"]=ToPython(s);
if (axes!=null) kwargs["axes"]=ToPython(axes);
if (norm!=null) kwargs["norm"]=ToPython(norm);
dynamic py = __self__.InvokeMethod("rfft2", pyargs, kwargs);
return ToCsharp<NDarray>(py);
}
/// <summary>
/// Compute the 2-dimensional inverse FFT of a real array.<br></br>
///
/// Notes
///
/// This is really irfftn with different defaults.<br></br>
///
/// For more details see irfftn.
/// </summary>
/// <param name="a">
/// The input array
/// </param>
/// <param name="s">
/// Shape of the inverse FFT.
/// </param>
/// <param name="axes">
/// The axes over which to compute the inverse fft.<br></br>
///
/// Default is the last two axes.
/// </param>
/// <param name="norm">
/// Normalization mode (see numpy.fft).<br></br>
/// Default is None.
/// </param>
/// <returns>
/// The result of the inverse real 2-D FFT.
/// </returns>
public NDarray fft_irfft2(NDarray a, int[] s = null, int[] axes = null, string norm = null)
{
//auto-generated code, do not change
var fft = self.GetAttr("fft");
var __self__=fft;
var pyargs=ToTuple(new object[]
{
a,
});
var kwargs=new PyDict();
if (s!=null) kwargs["s"]=ToPython(s);
if (axes!=null) kwargs["axes"]=ToPython(axes);
if (norm!=null) kwargs["norm"]=ToPython(norm);
dynamic py = __self__.InvokeMethod("irfft2", pyargs, kwargs);
return ToCsharp<NDarray>(py);
}
/// <summary>
/// Compute the N-dimensional discrete Fourier Transform for real input.<br></br>
///
/// This function computes the N-dimensional discrete Fourier Transform over
/// any number of axes in an M-dimensional real array by means of the Fast
/// Fourier Transform (FFT).<br></br>
/// By default, all axes are transformed, with the
/// real transform performed over the last axis, while the remaining
/// transforms are complex.<br></br>
///
/// Notes
///
/// The transform for real input is performed over the last transformation
/// axis, as by rfft, then the transform over the remaining axes is
/// performed as by fftn.<br></br>
/// The order of the output is as for rfft for the
/// final transformation axis, and as for fftn for the remaining
/// transformation axes.<br></br>
///
/// See fft for details, definitions and conventions used.
/// </summary>
/// <param name="a">
/// Input array, taken to be real.
/// </param>
/// <param name="s">
/// Shape (length along each transformed axis) to use from the input.<br></br>
///
/// (s[0] refers to axis 0, s[1] to axis 1, etc.).<br></br>
///
/// The final element of s corresponds to n for rfft(x, n), while
/// for the remaining axes, it corresponds to n for fft(x, n).<br></br>
///
/// Along any axis, if the given shape is smaller than that of the input,
/// the input is cropped.<br></br>
/// If it is larger, the input is padded with zeros.<br></br>
///
/// if s is not given, the shape of the input along the axes specified
/// by axes is used.
/// </param>
/// <param name="axes">
/// Axes over which to compute the FFT.<br></br>
/// If not given, the last len(s)
/// axes are used, or all axes if s is also not specified.
/// </param>
/// <param name="norm">
/// Normalization mode (see numpy.fft).<br></br>
/// Default is None.
/// </param>
/// <returns>
/// The truncated or zero-padded input, transformed along the axes
/// indicated by axes, or by a combination of s and a,
/// as explained in the parameters section above.<br></br>
///
/// The length of the last axis transformed will be s[-1]//2+1,
/// while the remaining transformed axes will have lengths according to
/// s, or unchanged from the input.
/// </returns>
public NDarray fft_rfftn(NDarray a, int[] s = null, int[] axes = null, string norm = null)
{
//auto-generated code, do not change
var fft = self.GetAttr("fft");
var __self__=fft;
var pyargs=ToTuple(new object[]
{
a,
});
var kwargs=new PyDict();
if (s!=null) kwargs["s"]=ToPython(s);
if (axes!=null) kwargs["axes"]=ToPython(axes);
if (norm!=null) kwargs["norm"]=ToPython(norm);
dynamic py = __self__.InvokeMethod("rfftn", pyargs, kwargs);
return ToCsharp<NDarray>(py);
}
/// <summary>
/// Compute the inverse of the N-dimensional FFT of real input.<br></br>
///
/// This function computes the inverse of the N-dimensional discrete
/// Fourier Transform for real input over any number of axes in an
/// M-dimensional array by means of the Fast Fourier Transform (FFT).<br></br>
/// In
/// other words, irfftn(rfftn(a), a.shape) == a to within numerical
/// accuracy.<br></br>
/// (The a.shape is necessary like len(a) is for irfft,
/// and for the same reason.)
///
/// The input should be ordered in the same way as is returned by rfftn,
/// i.e.<br></br>
/// as for irfft for the final transformation axis, and as for ifftn
/// along all the other axes.<br></br>
///
/// Notes
///
/// See fft for definitions and conventions used.<br></br>
///
/// See rfft for definitions and conventions used for real input.
/// </summary>
/// <param name="a">
/// Input array.
/// </param>
/// <param name="s">
/// Shape (length of each transformed axis) of the output
/// (s[0] refers to axis 0, s[1] to axis 1, etc.).<br></br>
/// s is also the
/// number of input points used along this axis, except for the last axis,
/// where s[-1]//2+1 points of the input are used.<br></br>
///
/// Along any axis, if the shape indicated by s is smaller than that of
/// the input, the input is cropped.<br></br>
/// If it is larger, the input is padded
/// with zeros.<br></br>
/// If s is not given, the shape of the input along the
/// axes specified by axes is used.
/// </param>
/// <param name="axes">
/// Axes over which to compute the inverse FFT.<br></br>
/// If not given, the last
/// len(s) axes are used, or all axes if s is also not specified.<br></br>
///
/// Repeated indices in axes means that the inverse transform over that
/// axis is performed multiple times.
/// </param>
/// <param name="norm">
/// Normalization mode (see numpy.fft).<br></br>
/// Default is None.
/// </param>
/// <returns>
/// The truncated or zero-padded input, transformed along the axes
/// indicated by axes, or by a combination of s or a,
/// as explained in the parameters section above.<br></br>
///
/// The length of each transformed axis is as given by the corresponding
/// element of s, or the length of the input in every axis except for the
/// last one if s is not given.<br></br>
/// In the final transformed axis the length
/// of the output when s is not given is 2*(m-1) where m is the
/// length of the final transformed axis of the input.<br></br>
/// To get an odd
/// number of output points in the final axis, s must be specified.
/// </returns>
public NDarray fft_irfftn(NDarray a, int[] s = null, int[] axes = null, string norm = null)
{
//auto-generated code, do not change
var fft = self.GetAttr("fft");
var __self__=fft;
var pyargs=ToTuple(new object[]
{
a,
});
var kwargs=new PyDict();
if (s!=null) kwargs["s"]=ToPython(s);
if (axes!=null) kwargs["axes"]=ToPython(axes);
if (norm!=null) kwargs["norm"]=ToPython(norm);
dynamic py = __self__.InvokeMethod("irfftn", pyargs, kwargs);
return ToCsharp<NDarray>(py);
}
/// <summary>
/// Compute the FFT of a signal that has Hermitian symmetry, i.e., a real
/// spectrum.<br></br>
///
/// Notes
///
/// hfft/ihfft are a pair analogous to rfft/irfft, but for the
/// opposite case: here the signal has Hermitian symmetry in the time
/// domain and is real in the frequency domain.<br></br>
/// So here it’s hfft for
/// which you must supply the length of the result if it is to be odd.
/// </summary>
/// <param name="a">
/// The input array.
/// </param>
/// <param name="n">
/// Length of the transformed axis of the output.<br></br>
/// For n output
/// points, n//2 + 1 input points are necessary.<br></br>
/// If the input is
/// longer than this, it is cropped.<br></br>
/// If it is shorter than this, it is
/// padded with zeros.<br></br>
/// If n is not given, it is determined from the
/// length of the input along the axis specified by axis.
/// </param>
/// <param name="axis">
/// Axis over which to compute the FFT.<br></br>
/// If not given, the last
/// axis is used.
/// </param>
/// <param name="norm">
/// Normalization mode (see numpy.fft).<br></br>
/// Default is None.
/// </param>
/// <returns>
/// The truncated or zero-padded input, transformed along the axis
/// indicated by axis, or the last one if axis is not specified.<br></br>
///
/// The length of the transformed axis is n, or, if n is not given,
/// 2*m - 2 where m is the length of the transformed axis of
/// the input.<br></br>
/// To get an odd number of output points, n must be
/// specified, for instance as 2*m - 1 in the typical case,
/// </returns>
public NDarray fft_hfft(NDarray a, int? n = null, int? axis = -1, string norm = null)
{
//auto-generated code, do not change
var fft = self.GetAttr("fft");
var __self__=fft;
var pyargs=ToTuple(new object[]
{
a,
});
var kwargs=new PyDict();
if (n!=null) kwargs["n"]=ToPython(n);
if (axis!=-1) kwargs["axis"]=ToPython(axis);
if (norm!=null) kwargs["norm"]=ToPython(norm);
dynamic py = __self__.InvokeMethod("hfft", pyargs, kwargs);
return ToCsharp<NDarray>(py);
}
/// <summary>
/// Compute the inverse FFT of a signal that has Hermitian symmetry.<br></br>
///
/// Notes
///
/// hfft/ihfft are a pair analogous to rfft/irfft, but for the
/// opposite case: here the signal has Hermitian symmetry in the time
/// domain and is real in the frequency domain.<br></br>
/// So here it’s hfft for
/// which you must supply the length of the result if it is to be odd:
/// </summary>
/// <param name="a">
/// Input array.
/// </param>
/// <param name="n">
/// Length of the inverse FFT, the number of points along
/// transformation axis in the input to use.<br></br>
/// If n is smaller than
/// the length of the input, the input is cropped.<br></br>
/// If it is larger,
/// the input is padded with zeros.<br></br>
/// If n is not given, the length of
/// the input along the axis specified by axis is used.
/// </param>
/// <param name="axis">
/// Axis over which to compute the inverse FFT.<br></br>
/// If not given, the last
/// axis is used.
/// </param>
/// <param name="norm">
/// Normalization mode (see numpy.fft).<br></br>
/// Default is None.
/// </param>
/// <returns>
/// The truncated or zero-padded input, transformed along the axis
/// indicated by axis, or the last one if axis is not specified.<br></br>
///
/// The length of the transformed axis is n//2 + 1.
/// </returns>
public NDarray fft_ihfft(NDarray a, int? n = null, int? axis = -1, string norm = null)
{
//auto-generated code, do not change
var fft = self.GetAttr("fft");
var __self__=fft;
var pyargs=ToTuple(new object[]
{
a,
});
var kwargs=new PyDict();
if (n!=null) kwargs["n"]=ToPython(n);
if (axis!=-1) kwargs["axis"]=ToPython(axis);
if (norm!=null) kwargs["norm"]=ToPython(norm);
dynamic py = __self__.InvokeMethod("ihfft", pyargs, kwargs);
return ToCsharp<NDarray>(py);
}
/// <summary>
/// Return the Discrete Fourier Transform sample frequencies.<br></br>
///
/// The returned float array f contains the frequency bin centers in cycles
/// per unit of the sample spacing (with zero at the start).<br></br>
/// For instance, if
/// the sample spacing is in seconds, then the frequency unit is cycles/second.<br></br>
///
/// Given a window length n and a sample spacing d:
/// </summary>
/// <param name="n">
/// Window length.
/// </param>
/// <param name="d">
/// Sample spacing (inverse of the sampling rate).<br></br>
/// Defaults to 1.
/// </param>
/// <returns>
/// Array of length n containing the sample frequencies.
/// </returns>
public NDarray fft_fftfreq(int n, float? d = 1.0f)
{
//auto-generated code, do not change
var fft = self.GetAttr("fft");
var __self__=fft;
var pyargs=ToTuple(new object[]
{
n,
});
var kwargs=new PyDict();
if (d!=1.0f) kwargs["d"]=ToPython(d);
dynamic py = __self__.InvokeMethod("fftfreq", pyargs, kwargs);
return ToCsharp<NDarray>(py);
}
/// <summary>
/// Return the Discrete Fourier Transform sample frequencies
/// (for usage with rfft, irfft).<br></br>
///
/// The returned float array f contains the frequency bin centers in cycles
/// per unit of the sample spacing (with zero at the start).<br></br>
/// For instance, if
/// the sample spacing is in seconds, then the frequency unit is cycles/second.<br></br>
///
/// Given a window length n and a sample spacing d:
///
/// Unlike fftfreq (but like scipy.fftpack.rfftfreq)
/// the Nyquist frequency component is considered to be positive.
/// </summary>
/// <param name="n">
/// Window length.
/// </param>
/// <param name="d">
/// Sample spacing (inverse of the sampling rate).<br></br>
/// Defaults to 1.
/// </param>
/// <returns>
/// Array of length n//2 + 1 containing the sample frequencies.
/// </returns>
public NDarray fft_rfftfreq(int n, float? d = 1.0f)
{
//auto-generated code, do not change
var fft = self.GetAttr("fft");
var __self__=fft;
var pyargs=ToTuple(new object[]
{
n,
});
var kwargs=new PyDict();
if (d!=1.0f) kwargs["d"]=ToPython(d);
dynamic py = __self__.InvokeMethod("rfftfreq", pyargs, kwargs);
return ToCsharp<NDarray>(py);
}
/// <summary>
/// Shift the zero-frequency component to the center of the spectrum.<br></br>
///
/// This function swaps half-spaces for all axes listed (defaults to all).<br></br>
///
/// Note that y[0] is the Nyquist component only if len(x) is even.
/// </summary>
/// <param name="x">
/// Input array.
/// </param>
/// <param name="axes">
/// Axes over which to shift.<br></br>
/// Default is None, which shifts all axes.
/// </param>
/// <returns>
/// The shifted array.
/// </returns>
public NDarray fft_fftshift(NDarray x, int[] axes = null)
{
//auto-generated code, do not change
var fft = self.GetAttr("fft");
var __self__=fft;
var pyargs=ToTuple(new object[]
{
x,
});
var kwargs=new PyDict();
if (axes!=null) kwargs["axes"]=ToPython(axes);
dynamic py = __self__.InvokeMethod("fftshift", pyargs, kwargs);
return ToCsharp<NDarray>(py);
}
/// <summary>
/// The inverse of fftshift.<br></br>
/// Although identical for even-length x, the
/// functions differ by one sample for odd-length x.
/// </summary>
/// <param name="x">
/// Input array.
/// </param>
/// <param name="axes">
/// Axes over which to calculate.<br></br>
/// Defaults to None, which shifts all axes.
/// </param>
/// <returns>
/// The shifted array.
/// </returns>
public NDarray fft_ifftshift(NDarray x, int[] axes = null)
{
//auto-generated code, do not change
var fft = self.GetAttr("fft");
var __self__=fft;
var pyargs=ToTuple(new object[]
{
x,
});
var kwargs=new PyDict();
if (axes!=null) kwargs["axes"]=ToPython(axes);
dynamic py = __self__.InvokeMethod("ifftshift", pyargs, kwargs);
return ToCsharp<NDarray>(py);
}
}
}