question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vectorized utility functions: abs2, unit phasor, others?

See original GitHub issue

Description

It would be useful to have an efficient function for getting magnitude-squared (power) from real or complex variables. This came up in offline discussion of #742 , where abs is doing unnecessary work if we actually want power anyway.

This could be efficiently accomplished by using numba.vectorize to make a ufunc out of x * x.conj().

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:20 (20 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Ufuncs for complex numbers · Issue #13179 · numpy ... - GitHub
This is a tracker for a number of requests for making working with complex numbers a bit easier/faster. Get just the normalized number...
Read more >
Source code for librosa.util.utils
#!/usr/bin/env python # -*- coding: utf-8 -*- """Utility functions""" from ... Generate a vector >>> data = np.ones(5) >>> librosa.util.pad_center(data, ...
Read more >
A Unified Object-Oriented Language for Physical Systems ...
Abstract. This document defines the Modelica1 language, version 3.1, which is developed by the Modelica. Association, a non-profit ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found