I want to receive an array of data via SPI the arduino as slave

Hello i want to receive an array of data via SPI from a raspberry as master and the arduino as slave, but the method SPI.transfer(buffer,size) throw me an error, it said "55:6: note: candidate expects 1 argument, 2 provided".

The next is the code which throw me the error, i try to modify the code of Nick but it doesn't work, if i put the variable valor like a single byte not as array it only recieve the last value of the array from the raspberry.

#include <SPI.h>
int buf;
byte valor[2];

void setup(){ 
  //Initiate an SPI communication instance.
  //SPI.begin();
  Serial.println ();
pinMode(MISO, OUTPUT);
  //Create a serial connection to display the data on the terminal.
  Serial.begin(115200); 
    // turn on SPI in slave mode
  SPCR |= _BV(SPE);
  // turn on interrupts
  SPCR |= _BV(SPIE);
}

ISR (SPI_STC_vect){
{
  SPI.transfer(valor,2);
 
  //buf=c;

  } // end of switch

}

void loop (void)
{

  Serial.println(valor[1]);
  
  delay (1000);
}  // end of loop

i already did it via UART there is the code, i hope somebody can help me to do the same but via SPI, thank you.

void setup(){
  Serial.begin(9600);
}
byte valor[2];
int x=0;
void loop() {

        
        if (Serial.available() > 0) {
               
                Serial.readBytes((char *)valor,sizeof (valor));
                x=(valor[0]+(valor[1] << 8));
                Serial.println(valor[0], DEC);
                Serial.println(valor[1], DEC);
        }
}

Why do YOU think that SPI.transfer() can send an entire array? Isn't it obvious that it can't?

Isn't it obvious that you need to use a for loop to send the array one element at a time?

I think that because in python i am receiving arrays without the need of a for, the method do that, if i'd did the SPI library in arduino i'd known if a "for" should be necessary or not, but i suppouse you do that library, because all is obviously for you, it would be terribly living in a world where the things that are obviously for you doesn't for all people, sorry for spend your time, really sorry.