ee.Array.pow

On an element-wise basis, raises the first value to the power of the second.

UsageReturns
Array.pow(right)Array
ArgumentTypeDetails
this: leftArray

The left-hand value.

rightArray

The right-hand value.

Examples

JavaScript

var empty = ee.Array([], ee.PixelType.int8());
print(empty.pow(empty));  // []

// [0.25,-0.5,1,-2,4,-8]
print(ee.Array([-2, -2, -2, -2, -2, -2]).pow([-2, -1, 0, 1, 2, 3]));

// [1,-1,1,-1,1,-1]
print(ee.Array([-1, -1, -1, -1, -1, -1]).pow([-2, -1, 0, 1, 2, 3]));

// print(ee.Array([0, 0, 0, 0, 0, 0]).pow([-2, -1, 0, 1, 2, 3]));
print(ee.Array([0, 0, 0, 0]).pow([0, 1, 2, 3]));

// [1,1,1,1,1,1]
print(ee.Array([1, 1, 1, 1, 1, 1]).pow([-2, -1, 0, 1, 2, 3]));

// [0.25,0.5,1,2,4,8]
print(ee.Array([2, 2, 2, 2, 2, 2]).pow([-2, -1, 0, 1, 2, 3]));

// [0.009999999776482582,
//  0.10000000149011612,
//  1,
//  10,
//  100,
//  1000]
print(ee.Array([10, 10, 10, 10, 10, 10]).pow([-2, -1, 0, 1, 2, 3]));

// [0.009999999776482582,
//  0.10000000149011612,
//  1,
//  10,
//  100,
//  1000]
print(ee.Array([10, 10, 10, 10, 10, 10], ee.PixelType.int32())
        .pow([-2, -1, 0, 1, 2, 3]));

Python

# Your example goes here!