Telecommuting New York / Los Angeles

I spent Jan-Oct working in New York City and Nov-Dec telecommuting from Los Angeles (the same job). Should I pay 2/12 state taxes to CA and claim a credit from NY or pay 12/12 to NY? I am normally a NYC resident and relocated temporarily to LA (for the weather) whilst maintaining an apartment in NYC. My W2 has some tax withholding in CA.