For which purpose? Pilates can work on building strength if done correctly. Yoga can - for a small group of people - improve some flexibility - but it is not its purpose.
If your aim is to improve range of motion then a targeted program designed for you by a sport or rehab physio is most efficient - ie you work on areas that you need to improve with stretches that target specific muscle groups (many of Yoga's positions use multiple muscle groups which enable those already long enough to take up the slack so no stretching occurs and other positions are not possible due to a person's bone configuration eg the lotus).
I'm a big fan of Pilates if you can find a good teacher. It develops control and strength in a lot of areas that other forms of exercise tend not to get to, and can be great for body awareness and posture too. It's much better if you can find a teacher who uses the implements (balls, rings, thera-bands, weights etc) rather than one who just does matwork, as it seems like the versions of exercises which use the implements are generally more effective & work more muscle groups (or maybe just force you to actually use all the right muscle groups).
I used to do yoga a few years ago, and never really felt that it was particularly beneficial to my dance ability, although it could be relaxing (and on one occasion I hurt myself practising in a cold room). For flexibility, I prefer just to use my own stretching sequence after dance practise, with stretches I've gathered from various dance teachers and found to be effective (and hopefully safe).
I don't know how much different "schools" of pilates vary, but when it comes to yoga, there are practices that are more mind-directed, and that are more physically intense, and everything in between. I just suggest trying out different things, and see what works for you. For example, I am a great fan of dynamic yoga, because I really feel it makes my body work with places that I don't usually use. The pilates classes I took before moving to AUE were also fun, but that was because they were just a big challenge for me :lol:
I still love pilates, and I've also now discovered the joys of reformer pilates (which is especially brilliant for fine control of movements, but also especially difficult and painful). Now I'm living in an area where I can't get to any weekly bellydance classes, two hours a week of serious pilates is what's keeping me sane and physically functional. Only trouble is, with not enough consistent dance training and stretching alongside it, all the extra core strength has reduced my range of motion for isolations, so now I have to work hard to build that back up