セル範囲の文字列を結合するのは、CONCATENATE関数でもできますが、今回はマクロで行います。 範囲がA1セルからA5セルというように固定している場合は、For Each~Nextを使って次のようなコードでできます。 (サンプルファイルは、こちらからマクロ67回サンプルデータ) ...
format_tb(tb)[0] # Concatenate error information into message string pymsg = 'PYTHON ERRORS:\nTraceback info:\n{0}\nError Info:\n{1}'\ .format(tbinfo, str(sys.exc_info()[1])) msgs = 'ArcPy ERRORS:\n {0}\n'.format(arcpy.GetMessages(2)) # Return python error messages fo...
all_fpr=np.unique(np.concatenate([fpr[i]foriinrange(n_classes)])) なにやら複雑そうな一行ですが,やってることはシンプルで,今回得られた3つのfprの値を重複しない形で一つのリストにしているだけです.つまり,この値に対してのみyの値(tpr)の平均をとっていけばいいことになります....
"""); static void OutputQueryResults(IEnumerable<string> query, string message) { Console.WriteLine(Environment.NewLine + message); foreach (string item in query) { Console.WriteLine(item); } Console.WriteLine($"{query.Count()} total names in list"); } /* Output: Simple concatenate and ...
(concatQuery,"Simple concatenate and sort. Duplicates are preserved:");// Concatenate and remove duplicate names based on// default string comparer.varuniqueNamesQuery = fileA.Union(fileB).OrderBy(s => s); OutputQueryResults(uniqueNamesQuery,"Union ...