<commit_before>package org.eclipse.scanning.points;

import java.util.Iterator;

import org.eclipse.scanning.api.points.IPosition;
import org.eclipse.scanning.api.points.models.ArrayModel;
import org.eclipse.scanning.points.ScanPointGeneratorFactory.JythonObjectFactory;

class ArrayIterator extends AbstractScanPointIterator {

	private ArrayModel model;
	int index = 0;

	public ArrayIterator(ArrayGenerator gen) {
		this.model= gen.getModel();
		
        JythonObjectFactory arrayGeneratorFactory = ScanPointGeneratorFactory.JArrayGeneratorFactory();

        String name = model.getName();
        double[] points = model.getPositions();
        
        @SuppressWarnings("unchecked")
		Iterator<IPosition> iterator = (Iterator<IPosition>) arrayGeneratorFactory.createObject(
				name, "mm", points);
        pyIterator = iterator;
	}

	@Override
	public boolean hasNext() {
		return pyIterator.hasNext();
	}
<commit_msg>fix for creating iterator for array generator, names must be a list<commit_after>package org.eclipse.scanning.points;

import java.util.Arrays;
import java.util.Iterator;

import org.eclipse.scanning.api.points.IPosition;
import org.eclipse.scanning.api.points.models.ArrayModel;
import org.eclipse.scanning.points.ScanPointGeneratorFactory.JythonObjectFactory;
import org.python.core.PyList;

class ArrayIterator extends AbstractScanPointIterator {

	private ArrayModel model;
	int index = 0;

	public ArrayIterator(ArrayGenerator gen) {
		this.model= gen.getModel();
		
        JythonObjectFactory arrayGeneratorFactory = ScanPointGeneratorFactory.JArrayGeneratorFactory();

        double[] points = model.getPositions();        
        PyList names =  new PyList(Arrays.asList(new String[] { model.getName()}));
        
        @SuppressWarnings("unchecked")
		Iterator<IPosition> iterator = (Iterator<IPosition>) arrayGeneratorFactory.createObject(
				names, "mm", points);
        pyIterator = iterator;
	}

	@Override
	public boolean hasNext() {
		return pyIterator.hasNext();
	}

{'fraction_non_alphanumeric': 0.09871031746031746, 'fraction_numerical': 0.000992063492063492, 'mean_word_length': 4.526027397260274, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2146744', 'n_tokens_mistral': 585, 'n_tokens_neox': 553, 'n_words': 118}