i need to copy N unsigned short number that live in an N-dimensional array onto an equal size array of floats (the original array - unsigned short - is returned by the cfitsio library). can i use memcpy to do that?
i naively attempted to write

float *pixels;
unsigned int *flux;
... malloc-ing and filling up flux[]
pixels = malloc(N*sizeof (float));
memcpy( pixels, (float *) flux, N*sizeof (float));...