Dimensional crossover transition in a system of weakly coupled superconducting nanowires