Category "enumerate"

Write-Output -InputObject (,'Test') -NoEnumerate

I think this is a bug that only applies to PowerShell Windows 5.1: The -NoEnumerate switch doesn't work when the input is provided via the named -InputObject a

Filling a 2D array with values from a 1D array, but using list comprehension

I'm trying to "paste" the values contained in the 1D array dataslice (1x8) into the 2D array values_matrix (9x9), following the position indices contained in th

Python enumerate downwards or with a custom step

How to make Python's enumerate function to enumerate from bigger numbers to lesser (descending order, decrement, count down)? Or in general, how to use differen

What is the most pythonic way to have inverse enumerate of a list?

The first thing that comes to mind is: >>> l = list('abcdef') >>> for i in range(len(l)-1, -1, -1): ... item = l[i] ... print(i, item) ...

Archestra list all engines on a platform

I need to write a script able to print a list of all the engines existing on an Archestra platform. I've tried to create a script at the platform level, but hav

Apply a function to three parallel array of arrays

I have three arrays of arrays like this: catLabels = [catA, catB, catC] binaryLabels = [binA, binB, binC] trueLabels = [] trueLabels.extend(repeat(y_true_cat