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.

Extend power operation

See original GitHub issue

This is something that can be done with numpy.array but not with galois.FieldArray at the moment.

import numpy as np
import galois

2**np.arange(10)
array([  1,   2,   4,   8,  16,  32,  64, 128, 256, 512])

GF = galois.GF(2**9)
2**GF.Range(0, 10)
# TypeError: Operation 'power' requires the first operand to be a GF(2^9) array, not <class 'int'>.

GF(2)**GF.Range(0, 10)
# TypeError: Operation 'power' requires the second operand to be an integer array, not <class 'numpy.ndarray over GF(2^9)'>.

I think some kind of casting can be done here, similarly to numpy. What do you think?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
iyanmvcommented, Jan 24, 2022

Ups, you are right… I always was thinking in prime finite fields only, but the moment you try to do these things with extended fields, things get ugly.

0reactions
iyanmvcommented, Jan 24, 2022

I think I will close this because I think the only scenario where it would make a bit of sense is with prime finite fields. But then, choosing which field should be use to cast the arrays is completely arbitrary (first, highest order?).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extending Power Operation - Schneider Electric
Power Operation offers several means to extend and customize your system. CiCode scripting. CiCode allows you to access all real-time data within Power...
Read more >
Exponentiation - Wikipedia
Exponentiation is a mathematical operation, written as b n, involving two numbers, the base b and the exponent or power n, and pronounced...
Read more >
TechTalk Series: Using the Power Platform to Extend Finance ...
Using the Power Platform to Extend Finance and Operations Apps ... This TechTalk series will provide information and resources that will help you ......
Read more >
Mod 2 power operations revisited
In this mostly expository note we take advantage of homotopical and algebraic advances to give a modern account of power operations on the...
Read more >
Redondo Beach power plant operations extended to 2023
What You Need To Know. The AES Redondo power plant will continue operating until at least 2023, following a vote of California's State...
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